in reply to File Parsing and String Formatting
# lets assume we are starting after the split in your sub # so the contents of @fields would be @fields = ( '463694', 'BROOKS JR', 'JAMES', 'ArnoldMarkoe', '1/17/03', 'MD Wkly Note', '17\00004DA5.005' ); # # So with that assumption you are attempting to join 0 .. 5 # and the last field's file extension? # here im not sure if you want the actual file name, or # simply the extension of the file, as you are going to # glob all files in that sub dir with that file extension # I will assume its the last case. # $line = join('|', @fields[0 .. 5]) . '|H:\\' . ( split(/\\/, $fields[-1]) )[0] . '\\.' . ( split(/\./, $fields[-1]) )[1]; print "$line\n"; # # which will produce # 463694|BROOKS JR|JAMES|ArnoldMarkoe|1/17/03|MD Wkly Note|H:\17\.005
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: File Parsing and String Formatting
by skyler (Beadle) on Feb 17, 2003 at 03:01 UTC | |
by l2kashe (Deacon) on Feb 17, 2003 at 03:20 UTC |