Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: newbie need help with a simple code

by perlmonk007 (Novice)
on Mar 05, 2013 at 05:11 UTC ( #1021748=note: print w/replies, xml ) Need Help??


in reply to Re^3: newbie need help with a simple code
in thread newbie need help with a simple code

Im sorry, i meant are the regex automatically captured to the scalars, if not what do i need to do to capture them into $1, $2 etc
  • Comment on Re^4: newbie need help with a simple code

Replies are listed 'Best First'.
Re^5: newbie need help with a simple code
by kielstirling (Scribe) on Mar 05, 2013 at 05:25 UTC
    $1, $2, $3 and so on are what Perl populates captures to. However, some of us use a syntax that allows for named captures. If you read the man page for perlre all will become clear.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021748]
help
Chatterbox?
[hippo]: Congratulations, Discipulus!
[Discipulus]: Satura Lanx was a latin genre of show
[Discipulus]: coming from the meaning of 'mixed dish'
[Discipulus]: thanks hippo! the hat you passed me was brand new and clean, thanks
LanX OS builds on multitasking humor ...
[LanX]: ... next release comes with even more random puns!

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2017-07-28 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (426 votes). Check out past polls.