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

Re: Re: help with (what I consider) a strange problem

by sachmet (Scribe)
on Mar 19, 2001 at 07:26 UTC ( [id://65351]=note: print w/replies, xml ) Need Help??


in reply to Re: help with (what I consider) a strange problem
in thread help with (what I consider) a strange problem

Nope... chomp returns number of chars chopped. So:
$t = "t\n"; $num = chomp($t); print "$num"
prints "1", whereas:
$t = "t"; $num = chomp($t); print "$num"
prints "", whereas:
@t = ("t\n","u\n","v","w\n"); $num = chomp(@t); print "$num";

prints "3".

(edited: error in my code fixed)

Log In?
Username:
Password:

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

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

    No recent polls found