View Single Post
  #11 (permalink)  
Old 05-22-2008, 07:10 PM
John_L John_L is offline
Newbie
 
Join Date: May 2008
Posts: 10
Credits: 0
Rep Power: 0
John_L is on a distinguished road
Default Re: Regex Expressions

alright, cool thanks. I'm also having problems concatenating strings from standard input. My subroutine is called that contains a string in $_[0], which I want to concatenate with input from <stdin>. "." or "join()" doesn't seem to work. Can "\n" - new line characters cause problems when reading from standard input?

Code:
while( $line = <stdin> )
{
   $_[0] = $_[0] . $line  #doesn't work
   $_[0] .= $line           #doesn't work
}
what's the best way to get this to work?
Reply With Quote