in reply to Problem with string manipulation
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problem with string manipulation
by webengr (Pilgrim) on Jan 03, 2003 at 23:18 UTC | |
|
Re: Re: Problem with string manipulation
by Anonymous Monk on Jan 03, 2003 at 22:45 UTC |