in reply to Problem with string manipulation
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;
|
|---|