#!/usr/bin/perl use strict; open( my $out_file, '>', "/tmp/outfile" ) or die "Error: Cannot open file\n"; while( my $line = <DATA> ) { $line =~ s/\s/\|/g; print $out_file "|" . $line . "\n"; } close( $out_file ); __DATA__ 0211121253 Mike Dell ID06533 0211121253 Chris Jones ID02014 0211121253 Pa Kettle ID65255 0111119112 Mitch Poo ID05983
In reply to Re: parse array to replace specific spaces with pipes
by bichonfrise74
in thread parse array to replace specific spaces with pipes
by neurotoxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |