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

What's happening to my $1?

by Not_a_Number (Prior)
on Jan 20, 2004 at 20:25 UTC ( [id://322697]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %totals;
    while ( <DATA> ) {
       chomp;
    ...
    21
    player1
    22
    
  2. or download this
    player1: 66
    player2: 31
    
  3. or download this
    while ( <DATA> ) {
       if ( /^([A-Z]+)$/ ) { print "In if:   $1\n"; }
       else { print "In else: $1\n"; }
    ...
    xyz
    BAR
    dfgdfg
    
  4. or download this
    In if:   FOO
    In else: FOO
    In else: FOO
    In if:   BAR
    In else: BAR
    
  5. or download this
    __DATA__
    FOO
    1234
    Xyz
    BAR
    DFGdfg
    
  6. or download this
    In if:   FOO
    In else: FOO
    In else: F
    In if:   BAR
    In else: B
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-19 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found