Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: I'm so confused

by the_0ne (Pilgrim)
on Nov 24, 2001 at 07:07 UTC ( #127217=note: print w/replies, xml ) Need Help??


in reply to I'm so confused

It looks like what's happening is line one and two have newlines (\n) and three doesn't. Same with four and five. So, if you really do want the newlines in each instance of the array, then you should probably do this...
while (<FH>) { chomp; push @out, lc("$_\n"); }
If you do not want the newlines in each instance of the array, then just use the chomp.

Unless I'm totally misunderstanding, that should take care of your problem.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-10-23 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?