954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

cant get my script input from a piped command

so i need to have a script that takes input from a command and parses it for some info
im still pretty new to perl, but from what i understand, to do something like that youd have something like:

while ($line = <STDIN>)
{
blah blah blah
}


that would take the piped command in as input for the script, and i can do my stuff inside the while loop
but for some reason every time i run the script i'm getting

line 3: syntax error near unexpected token `)'
line 3: `while ($line = )'

what am i doing wrong?

thecrossibear
Newbie Poster
2 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

its cause you had !# instead of #! you idiot -_-
sorry about this post

thecrossibear
Newbie Poster
2 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You