Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: my least favorite perl feature

by tall_man (Parson)
on Feb 05, 2003 at 21:07 UTC ( #232926=note: print w/replies, xml ) Need Help??


in reply to my least favorite perl feature

What is "overloaded" by design in perl is two possible values for every scalar: a string or a number. The comparison operators let you choose which. Do you want to give up either lexical or numeric sorting by overloading "<=>"?

By the way, if you "use warnings" perl will help you out, like so:

Argument "bbb" isn't numeric in numeric eq (==) at ddd.pl line 4.

Replies are listed 'Best First'.
Re: Re: my least favorite perl feature
by waxmop (Beadle) on Feb 05, 2003 at 21:30 UTC

    I would "use warnings", but in mason, it just isn't useful. For example, here's the message I get back when I "use warnings":

    Mason error error in file: /usr/local/lib/perl5/5.6.0/Carp/Heavy.pm line 79: Bizarre copy of HASH in aassign context: ... 75: # them according to the format variables defined earlier in 76: # this file and join them onto the $sub sub-routine str +ing 77: if ($hargs) { 78: # we may trash some of the args so we take a copy 79: @a = @DB::args; # must get local copy of args 80: # don't print any more than $MaxArgNums 81: if ($MaxArgNums and @a > $MaxArgNums) { 82: # cap the length of $#a and set the last element to '.. +.' 83: $#a = $MaxArgNums; ... component stack: /orders_survey/search.html code stack: /usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:79

    See what I mean?

      That's a bug in 5.6.0. Upgrading to 5.8 (or at least 5.6.1) ought to fix it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2021-02-28 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?