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

How to get ($1, $2, ...)?

by ferreira (Chaplain)
on Feb 16, 2007 at 13:33 UTC ( #600423=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $text = <<TEXT;
    
    ...
    
    use Data::Dump qw(dump);
    print dump(\@answers);
    
  2. or download this
    (
      ["The Moor's Last Sigh", "Salman", "Rushdie"],
      ["The God of Small Things", "Arundhati", "Roy"],
    )
    
  3. or download this
    if ($text =~ /$re1/mgc) { ...
    if ($text =~ /$re2/mgc) { ...
    if ($text =~ /$re1/mgc) { ...
    if ($text =~ /$re2/mgc) { ...
    
  4. or download this
    # return ($1, $2, ...) matched against $s
    sub _groups {
    ...
        }
        return @groups
    }
    
  5. or download this
       push @answers, [ _groups($text) ]; # [ ($1, $2, ...) ]
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2019-07-15 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?