Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: regexp list return 5.6 vs 5.8

by almut (Canon)
on Jan 24, 2008 at 15:06 UTC ( [id://664050]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @x = ('A','B');
    
    ...
    print "-------------------\n";
    print "[foo", scalar(@x[0..-1]), "]\n";
    print "-------------------\n";
    
  2. or download this
    -------------------
    Use of uninitialized value in print at ./663945.pl line 9.
    ...
    -------------------
    [foo[foo]
    -------------------
    
  3. or download this
    -------------------
    Use of uninitialized value in print at ./663945.pl line 9.
    ...
    Use of uninitialized value in print at ./663945.pl line 15.
    [foo]
    -------------------
    
  4. or download this
    print "-------------------\n";
    print "[foo", scalar(('A','B')[0..2]), "]\n";
    ...
    print "-------------------\n";
    print "[foo", scalar(('A','B')[0..-1]), "]\n";
    print "-------------------\n";
    
  5. or download this
    -------------------
    Use of uninitialized value in print at ./663945.pl line 26.
    ...
    Argument "[foo" isn't numeric in list slice at ./663945.pl line 32.
    [fooA]
    -------------------
    
  6. or download this
    print "-------------------\n";
    print 2,  scalar(('A','B')[0..-1]), "]\n";  # elem at index 2 (undef)
    ...
    print "-------------------\n";
    print -3, scalar(('A','B')[0..-1]), "]\n";  # elem at index -3 (undef)
    print "-------------------\n";
    
  7. or download this
    -------------------
    Use of uninitialized value in print at ./663945.pl line 37.
    ...
    Use of uninitialized value in print at ./663945.pl line 47.
    -3]
    -------------------
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-03-28 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found