Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: "chomp" not working

by AnomalousMonk (Monsignor)
on May 02, 2012 at 23:57 UTC ( #968588=note: print w/ replies, xml ) Need Help??


in reply to Re^2: "chomp" not working
in thread "chomp" not working

a,b,c,d
e,f,g,h
i,j,k,l

@arr1 before the chomp should like like above when printed out.

Why would you expect that?

>perl -wMstrict -le "my $s = qq{a,b,c,d\ne,f,g,h\ni,j,k,l}; printf qq{$s}; printf qq{\n}; ;; my @ra = split /\n/, $s; printf qq{@ra}; printf qq{\n}; ;; chomp @ra; printf qq{@ra}; printf qq{\n}; " a,b,c,d e,f,g,h i,j,k,l a,b,c,d e,f,g,h i,j,k,l a,b,c,d e,f,g,h i,j,k,l


Comment on Re^3: "chomp" not working
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-08-21 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls