open(IN, "<", "print_tools.txt") or die "Cannot open print_tools.txt f +or reading, $!"; while(<IN>){ chomp; s/^\s+//; s/\s+{.*}//; print "modelCombo.addItem($_);\n"; }
Updated to fully satisfy OP's requirements.
In reply to Re: Problem with string manipulation
by Mr. Muskrat
in thread Problem with string manipulation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |