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

Re: Removing blank/empty lines

by toolic (Chancellor)
on Dec 11, 2012 at 14:03 UTC ( #1008305=note: print w/ replies, xml ) Need Help??


in reply to Removing blank/empty lines

Tip #2 from the Basic debugging checklist: print the value of the $_ variable in your foreach loop. Does it contain what you expect?

print "$_\n";


Comment on Re: Removing blank/empty lines
Download Code
Re^2: Removing blank/empty lines
by perlnoobster (Sexton) on Dec 11, 2012 at 14:20 UTC
    hi, thank you for replying, it does not show what I expect it to. it indicates a syntax error near ") print"? Please keep in mind that I am very new to perl and learning bits and pieces :)

      Syntax error it says. There's a close bracket before your print it says.

      Look at the code. Is that the close bracket on your loop list? Did you put the new print inside the curly {}'s of your loop?

        Hello, I put it in the brackets :) and received the following message: Use of uninitialized value in concatenation (.) or string at Text.pl line 92, <IN> line 12. (via secure crt)

      Make sure you put it inside the loop. The "{ }" brackets contain everything that's inside of your loop.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (19)
As of 2014-10-20 18:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (88 votes), past polls