Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Making/Using a module.

by Andrew_Levenson (Hermit)
on Mar 09, 2006 at 03:30 UTC ( [id://535318]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://535318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found