Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Curios use of regular expressions in split ($1 eh?)

by tye (Sage)
on Feb 15, 2012 at 17:47 UTC ( [id://954016]=note: print w/replies, xml ) Need Help??


in reply to Curios use of regular expressions in split

my @a = split /(abc)/, "uno abc dos"; print "\$1=($1)\n" if splice(@a,1,1) =~ /(.*)/; print "\@a=(", join(',',@a), ")\n"; __END__ $1=(abc) @a=(uno , dos)

- tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found