Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Dangerous Names

by Anonymous Monk
on Dec 18, 2008 at 13:39 UTC ( [id://731245]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Dangerous Names
in thread Dangerous Names

Whatcha talkin bout Willis?
D:\>perl -we"print for sort { warn qq,($a)($b),; $a <=> $b } 2, 1, 4 , + undef, undef, 3, 'nan','nan','inf','inf'" (2)(1) at -e line 1. Use of uninitialized value in concatenation (.) or string at -e line 1 +. (4)() at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. Use of uninitialized value $a in concatenation (.) or string at -e lin +e 1. ()(3) at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. (nan)(nan) at -e line 1. (inf)(inf) at -e line 1. Use of uninitialized value in concatenation (.) or string at -e line 1 +. (1)() at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. (1)(4) at -e line 1. (2)(4) at -e line 1. Use of uninitialized value $a in concatenation (.) or string at -e lin +e 1. Use of uninitialized value in concatenation (.) or string at -e line 1 +. ()() at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. Use of uninitialized value $a in concatenation (.) or string at -e lin +e 1. ()(1) at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. (1)(3) at -e line 1. (3)(2) at -e line 1. (3)(4) at -e line 1. (nan)(inf) at -e line 1. (inf)(nan) at -e line 1. Use of uninitialized value $a in concatenation (.) or string at -e lin +e 1. ()(nan) at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. Use of uninitialized value in concatenation (.) or string at -e line 1 +. (nan)() at -e line 1. Use of uninitialized value in numeric comparison (<=>) at -e line 1. (nan)(1) at -e line 1. (1)(nan) at -e line 1. (1)(inf) at -e line 1. (1)(inf) at -e line 1. Use of uninitialized value $_ in print at -e line 1. Use of uninitialized value $_ in print at -e line 1. nannaninfinf1234
I dont see how that can happen, except like
D:\>perl -e"print sort { $a <=> $b } undef, 1, undef, 2" 12 D:\>perl -e"print sort { $a <=> $b;undef } undef, 1, undef, 2" Sort subroutine didn't return a numeric value at -e line 1.
which is kind of stupid

Replies are listed 'Best First'.
Re^6: Dangerous Names
by tinita (Parson) on Dec 18, 2008 at 16:27 UTC
    Whatcha talkin bout Willis?
    My nickname is tinita.
    Go read the original posting.
    perl -wle'@a = sort { print "$a <=> $b"; $a <=> $b } 2, 3, "nan"; print "\@a = @a";' 2 <=> 3 2 <=> nan Sort subroutine didn't return a numeric value at -e line 1.
    So where's the last print statement? It isn't executed. sort dies. Or what exactly was your question?
      Dammit, Jim
      D:\>perl -wle"@a = sort { print qq,$a <=> $b,; $a <=> $b } 2, 3, qq,na +n,;print for @a 2 <=> 3 2 <=> nan nan 2 3
      Do you even look at what I post? It doesn't die for me. Perl 5.8/5.10
        Do you even look at what I post? It doesn't die for me. Perl 5.8/5.10
        I did.
        This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
        Please read Re: Dangerous Names - this seems to happen only on some ssystems.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-19 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found