Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 contemplating the Monastery: (5)
As of 2019-11-14 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (76 votes). Check out past polls.

    Notices?