I'd use Text::ParseWords. Maybe it's to good for the purpose, but at will never be too bad for it.
--use Text::ParseWords 'shellwords'; open my $infh , '<' , 'print_tools.txt' or die "... $!"; while( <$infh> ){ my $printer = ( shellwords($_) )[0]; print qq{modelCombo.addItem("$printer")\n}; } close $infh;
In reply to Re: Problem with string manipulation
by fruiture
in thread Problem with string manipulation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |