in reply to Re^3: Making/Using a module.
in thread Making/Using a module.

Alright, final question and i'll be done with this bit for now. In the search and replace bit, what is the $1?

Replies are listed 'Best First'.
Re^5: Making/Using a module.
by TGI (Parson) on Mar 09, 2006 at 06:10 UTC
    $file =~ s/^"(.+)"$/$1/; # unquote

    The parens in the regex capture text into numbered variables. The first set of parens grab into $1, the second into $2 and so forth. For more info check out perlre.

    It may be a bit off topic, but I'd really like to recommend that you pick up a copy of Learning Perl from a bookstore or your local library. It is the best introductory perl material I have seen. You'll be glad you did.


    TGI says moo