LoneWolf wrote:
>
> Here's the cleanup script as it stands right now. The problem with the file
> that comes out is leading white space after each |
>
Then focus on the pipe.
$_ =~ s/\s*\|\s*//g;
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
LoneWolf wrote:
> I have to parse a big file and I do it line by line to keep stuff going
> correctly. I am at a point where I need it to go through and replace every
> " with inches and ' with feet, IF item in front of it is a digit (0-9).
>
> I have this written in the script to parse it:
>
Hi Robert.
Robert wrote:
>
> The problem even with doing redundent things is that the dedundency's didn't
> clean up the extra white spaces in each line.
>
> I glob in the whole file, bad, I know, but it's what I know and what works,
> it also gives no overhead on the server and the script takes l
Jeff 'Japhy' Pinyan wrote:
>
> On Nov 12, Rob Dixon said:
>
> ><[EMAIL PROTECTED]> wrote:
> >>
> >> I have this written in the script to parse it:
> >> while ($line = ) {
> >> # $line = $line =~ /^\s*(.*)\s*\n$/;
> >> $line =~ s/^ //;
> >> $line =~ s/ $//;
> >> $line =~ s/\t/
Whoops, sorry. Name's Robert
The problem even with doing redundent things is that the dedundency's didn't
clean up the extra white spaces in each line.
I glob in the whole file, bad, I know, but it's what I know and what works,
it also gives no overhead on the server and the script takes less th
On Nov 12, Rob Dixon said:
><[EMAIL PROTECTED]> wrote:
>>
>> I have this written in the script to parse it:
>> while ($line = ) {
>> # $line = $line =~ /^\s*(.*)\s*\n$/;
>> $line =~ s/^ //;
>> $line =~ s/ $//;
>> $line =~ s/\t/|/g;
>> $line =~ s/\s+/ /mg;
>> $line =~ s/^\s*/
Hi. Please may we have a name, at least in the sig? Something
in me rebels against writing 'Hi Lonewolf'.
<[EMAIL PROTECTED]> wrote:
>
> I have to parse a big file and I do it line by line to keep stuff going
> correctly. I am at a point where I need it to go through and replace every
> " with i
LoneWolf wrote:
> I have to parse a big file and I do it line by line to keep stuff
> going correctly. I am at a point where I need it to go through and
> replace every " with inches and ' with feet, IF item in front of it
> is a
> digit (0-9).
You can use:
s/(\d)"/$1 inches/g
or
s/(?<=
LoneWolf wrote:
I have to parse a big file and I do it line by line to keep stuff going
correctly. I am at a point where I need it to go through and replace every
" with inches and ' with feet, IF item in front of it is a digit (0-9).
I have this written in the script to parse it:
while