At 04:18 PM 7/16/02 +0200, Martin A. Hansen wrote: >for the sake of order and logic, i want to split my perl script into >two files. > >what is the smart way to do this?
perl -nle 'BEGIN{$f=$ARGV[0];open $fh[$_],">$f.$_" for 1..2}print {$fh[1]} substr $_,0,length()/2; print {$fh[2]} substr $_,length()/2' myprog :-) -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]