Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Understanding regular expressions: why do I have to use map to clear up undefs in regex output?

by corenth (Monk)
on Jun 19, 2009 at 21:43 UTC ( [id://773137]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    
    ...
    
    print Dumper \@a;
    
  2. or download this
    
    
    ...
              '"day"',
              '"today"'
            ];
    
  3. or download this
    
    @b = $string =~/
    ...
    
    print Dumper \@b;
    
  4. or download this
            
    $VAR1 = [
    ...
              undef,
              'today'
            ];
    
  5. or download this
    
    
    ...
    /gx;
    
    print Dumper \@c;
    
  6. or download this
    $VAR1 = [
              '1',
    ...
              'day',
              'today'
            ];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://773137]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-16 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found