Re: problem opening file inside for-loop

2003-06-01 Thread R. Joseph Newton
"Johnson, Shaunn" wrote: > --thanks for the reply. > > --even still, if the file already exists, > --nothing is printed inside of the file. > --it's still empty and i'm not sure > --where it's breaking down. > > --i mean, i can see that it doesn't > --even print the first line (print statement), >

Re: problem opening file inside for-loop

2003-05-30 Thread Rob Dixon
Shaunn Johnson wrote: > --Rob > > --Thanks for your script! Looks like it works like > --a champ! > > --However, I don't have a clear understanding > --as to *how* it works. Specifically, how is the > --'build regex' being applied inside the SQL? > --I mean, how is it getting IN there? > --I'm lo

RE: problem opening file inside for-loop

2003-05-30 Thread Johnson, Shaunn
--Rob --Thanks for your script! Looks like it works like --a champ! --However, I don't have a clear understanding --as to *how* it works. Specifically, how is the --'build regex' being applied inside the SQL? --I mean, how is it getting IN there? --I'm looking at it and I don't fully grok the

Re: problem opening file inside for-loop

2003-05-29 Thread John W. Krahn
Rob Dixon wrote: > > John W. Krahn wrote: > > > > You should show the OP how to do it in perl. :-) > > Yes, but tough to do when I can only guess what 'date' does > and I have no *nix system with me. Rob, Rob, Rob ... you mean you're still running that evil MS OS? ;-) > Thanks for filling the

Re: problem opening file inside for-loop

2003-05-29 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: > > > > Shaunn Johnson wrote: > > > > > > # create a few variables > > > my $addr='[EMAIL PROTECTED]'; > > > #my $outfile=`date +%d%b%Y`; > > > my $outfile=`date | cut -f 1 -d ' '`; > > > my $datetype=`date`; > > > my $file='/usr/local/home/joe/tmp/backup_lis

Re: problem opening file inside for-loop

2003-05-29 Thread John W. Krahn
Rob Dixon wrote: > > Shaunn Johnson wrote: > > > > # create a few variables > > my $addr='[EMAIL PROTECTED]'; > > #my $outfile=`date +%d%b%Y`; > > my $outfile=`date | cut -f 1 -d ' '`; > > my $datetype=`date`; > > my $file='/usr/local/home/joe/tmp/backup_list.txt'; > > my $matchday=`date +%a`; > >

Re: problem opening file inside for-loop

2003-05-29 Thread Rob Dixon
Hi Shaunn. Shaunn Johnson wrote: > Howdy: > > I have a script where I would like to connect to > my database (PostgreSQL) and do a dump > depending on what day it is. I'm having > problems trying to figure out why I either can't > open a file to write to it inside the loop, or, if > I create a fi

RE: problem opening file inside for-loop

2003-05-29 Thread Johnson, Shaunn
x27;t know *why* it's not printing --anything and not returning an error. --any thoughts? -X -Original Message- From: WC -Sx- Jones [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 1:56 PM To: [EMAIL PROTECTED] Subject: Re: problem opening file inside for-loop On Wednesday, May 2

Re: problem opening file inside for-loop

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 12:43 PM, Johnson, Shaunn wrote: my $file='/usr/local/home/joe/tmp/backup_list.txt'; You cannot create a variable from something that does not yet exist. Try creating it first: `touch /usr/local/home/joe/tmp/backup_list.txt`; my $file='/usr/local/home/joe/tmp/ba