Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: regexp list return 5.6 vs 5.8

by almut (Canon)
on Jan 24, 2008 at 15:06 UTC ( #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
Node Status?
node history
Node Type: note [id://664050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-10-20 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (209 votes). Check out past polls.

    Notices?