in reply to Re: chomp not working
in thread chomp not working

I don't if the string end with line , I am giving the output as it is and trying to print the line as it is then next to the line I need to write valid or not valid . how ever if I try to type valid next to the line it will go to the next line no matter what I do :
print "$line valid\n";
will look somthing like this one % ...... valid

Replies are listed 'Best First'.
Re^3: chomp not working
by ikegami (Patriarch) on Feb 15, 2006 at 22:28 UTC
    Run
    $line = "one % : thrre blblblb % 545334\n"; chomp($line); print "$line valid\n";

    If you get

    one % : thrre blblblb % 545334 valid

    then someting is really wrong with your perl.

    If you get,

    one % : thrre blblblb % 545334 valid

    then chomp is working and my previous post stands. Answer the questions in my previous post if you want to find the problem. I've just added code snippets in that post to help you answer the questions.