Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Problem when using chomp on line read from file.

by Perl300 (Friar)
on Feb 26, 2018 at 22:19 UTC ( [id://1209999]=note: print w/replies, xml ) Need Help??


in reply to Re: Problem when using chomp on line read from file.
in thread [SOLVED]: Problem when using chomp on line read from file.

Thank you so much for your response. I got it fixed now by adding following line before the while loop

local $/ = "\r\n";

Now I get the desired output as:

Before while @local: Before chomp $line: 12.2(17d)SXB11 After chomp $line: 12.2(17d)SXB11 After push @local: 12.2(17d)SXB11 Before chomp $line: 5.10 Generic_118855-15 After chomp $line: 5.10 Generic_118855-15 After push @local: 12.2(17d)SXB11 5.10 Generic_118855-15 Before chomp $line: XYZ 7.1 After chomp $line: XYZ 7.1 After push @local: 12.2(17d)SXB11 5.10 Generic_118855-15 XYZ 7.1 After while @local: 12.2(17d)SXB11 5.10 Generic_118855-15 XYZ 7.1

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2024-04-25 04:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found