Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Regex question

by betterworld (Deacon)
on Oct 18, 2008 at 11:38 UTC ( #717932=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Regex question
in thread Regex question

Hmm, I meant this line of the OP's code:

my @nums = $data =~ /\d+/g;

I think it can be called an assignment to an array, which imposes a list context on the right-hand side, as it is described in perldata:

Assignment to a scalar evaluates the right-hand side in scalar context, while assignment to an array or hash evaluates the righthand side in list context. Assignment to a list (or slice, which is just a list anyway) also evaluates the righthand side in list context.

I think this would be an assignment to a list:

my ($num) = ...


Comment on Re^3: Regex question
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-04 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls