in reply to Seeking fixed length
Run it as perl convert.pl <input.txt >output.txtwhile( <> ){ split /,/; print pack 'A10'x (scalar @_), @_; }
See the docs for while, split and pack. You can accomplish similar things with sprintf (as pack stuff is pretty complicated if you're not used to perl). You might wanna check perldata and perlvar as well.
Hope this helps,
Jeroen
"We are not alone"(FZ)
Updated, typo fixed thanks particle.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Seeking fixed length
by particle (Vicar) on Jul 05, 2001 at 22:06 UTC |