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?
what's the best way to get this to work?Code:while( $line = <stdin> ) { $_[0] = $_[0] . $line #doesn't work $_[0] .= $line #doesn't work }
yes, chomp() the input from stdin:
while ( chomp(my $line = <STDIN>)) {
$_[0] .= $line;
}
I can't do that with the substitution expression can I? What if I have multiple CDATA tags to worry about? I'll try playing around
To me it looks like you are posting just to get your links posted on the forum. All you have done is posted pretty much useless replies to several very old threads. If thats not the case then I apologize. But if it is the case and you keep it up you'll just be banned from the forum and your posts removed and your links gone.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks