Where @current_sentence is an array consisting of the words in the sentence (which were stripped from a database file). The print will eventually be redirected to an output file, but in the meantime I just let it go to STDOUT. The problem is that the print statement is only printing out the beggining until the word 'so' and not the entire line. I'm not sure what the problem is. Thanks for any help.$string = "@current_sentence"; if( $string =~ /.*\bso\b.*/ ) { print $string; } #input: <s> so we can do it again yeah yeah </s> #output: <s> so
In reply to Why doesn't the whole line print? by hillard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |