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 ( #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
Node Status?
node history
Node Type: note [id://65351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-04-20 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?