User Profile

Collapse

Profile Sidebar

Collapse
d41
d41
Last Activity: Mar 23 '08, 04:27 PM
Joined: Mar 19 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • d41
    replied to Read Character by Character in each line
    in Perl
    '.' and '..' are two folders (I think) in every directory. '.' leads into the current directory, and '..' leads into the parent directory. If you're reading all the files in a foreach loop, you could just tell it next; if the filename is '.' or '..'. Or you could have it skip all filenames that start with a dot '.'.

    For checking if a line has a semicolon, you can just use a regular expression or the index() function
    regular...
    See more | Go to post

    Leave a comment:


  • Store package(class) name in a variable, and remove an instance of a package

    Hello. I have 2 (probably simple) perl questions.

    1. I want to store a package (or class) name in a variable. How do I do this? I want something like this:
    Code:
    @classes=("myclass","myotherclass","anotheroneofmyclasses");
    foreach(@classes){new $_;}
    I found you can do this with functions by doing \&functionnam e. Is there a similar way to do this for package names?

    2. After...
    See more | Go to post
No activity results to display
Show More
Working...