Re: Splitting & slurping a text file into two arrays

2003-03-27 Thread Rob Dixon
Dennis Warren wrote: > Thanks Rob, that helps me. > > > What do you mean by 'awk loads better'? > I mean that I know awk better than I know Perl. > In this context 'loads' means 'a lot', rather than transfer into memory or > any other such computerese. Ah! Sorry - I guess I expected the other leam

RE: Splitting & slurping a text file into two arrays

2003-03-27 Thread Dennis . Warren
d1, $Fld2) = split($FS, $_, ); push(@input,$Fld1); push(@input2,$Fld2); } Dennis -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: 27 March 2003 12:37 To: [EMAIL PROTECTED] Subject: Re: Splitting & slurping a text file into two arr

Re: Splitting & slurping a text file into two arrays

2003-03-27 Thread Rob Dixon
Hi Dennis. Dennis Warren wrote: > Hi everyone, > > I'm a hopeless hacker of Perl, and I tend to think in AWK-ish ways, simply > because I know awk loads better than Perl. What do you mean by 'awk loads better'? Beware that my Unix isn't especially strong! > Awk has unfortunately taught me to thi

Splitting & slurping a text file into two arrays

2003-03-27 Thread Dennis . Warren
Hi everyone, I'm a hopeless hacker of Perl, and I tend to think in AWK-ish ways, simply because I know awk loads better than Perl. Awk has unfortunately taught me to think purely in terms of fields... If I have a text file where the field separator is a new line and the record separator is a blan

Re: Slurping a Text file

2003-01-14 Thread Paul Johnson
Colin Johnstone said: > I wish to slurp in a letter template in the form of a text file and > substitute fields in the letter for variables that are input on my html > form. I indicate in the text file where the substitution should take place > by the use of a like in html. > > > All I need is

Re: re slurping a text file

2003-01-14 Thread Todd Wade
"Colin Johnstone" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I wish to slurp in a letter template in the form of a text file and > > > substitute fields in the letter for variables that are input on my html > > > form. I indicate in the text file where

RE: re slurping a text file

2003-01-14 Thread Colin Johnstone
]; [EMAIL PROTECTED]: Subject: re slurping a text file my %var = ('FirstName'=>'John Doe', 'time' => '12:12:56', 'date' => '2002-12-12'); $line =~ s{<([^>]+)>} { exists( $va

Re: Slurping a Text file

2003-01-14 Thread Vitaliy Babiy
my %var = ('FirstName'=>'John Doe', 'time' => '12:12:56', 'date' => '2002-12-12'); $line =~ s{<([^>]+)>} { exists( $var{$1} ) ? $var{$1} : "" }gsex; "Colin Johnstone" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >

Slurping a Text file

2003-01-14 Thread Colin Johnstone
Gidday all, I wish to slurp in a letter template in the form of a text file and substitute fields in the letter for variables that are input on my html form. I indicate in the text file where the substitution should take place by the use of a like in html. the Text file looks like this Dear ,