append local file to remote file

2002-02-07 Thread Alex Harris
Apologies for the loosely interpreted perl issue below. I have rsh on my system and nothing else is available that I know of. I need to send a local file to a remote system and APPEND the local file to the remote file. All I can find in the man pages however is how to do just the reverse. I

still not catching error

2002-02-01 Thread Alex Harris
I took out the exec and placed system. But even though work.pl doesn't exist on the remote system, still getting no error. Help! if (system("rsh $plant /u1/bin/forkit '/u1/bin/work.pl'") > 0) { excep(" $!\n"); } _

why doesn't this error

2002-02-01 Thread Alex Harris
First, I read perldoc -f exec() and did as follows: exec "rsh $plant /u1/bin/forkit 'work.pl'" or print STDERR "Couldn't fork it.\n $!\n"; BUT, even though the file it should be exec - ing 'work.pl' does NOT exist on the remote system, the error doesn't get kicked off. The only error I'

testing for a dir

2002-02-01 Thread Alex Harris
What is the best way, using rsh, to test if a directory exists on another server? _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: [EMAIL P

Getting a message

2002-01-24 Thread Alex Harris
exec "rsh $plant /u1/bin/forkit '/u1/bin/zwork.pl'" How do I use the above, which starts my process then lets my calling program continue, to check for an error? In this particular case, the error occurs because zwork.pl does not exists on the maching the rsh is calling and I need to note this

catching error

2002-01-24 Thread Alex Harris
exec "rsh $plant /u1/bin/forkit '/u1/bin/zwork.pl'" How do I use the above, which starts my process then lets my calling program continue, to check for an error? In this particular case, the error occurs because zwork.pl does not exists on the maching the rsh is calling and I need to note thi

adding date to filename.

2002-01-22 Thread Alex Harris
$errlog = `date."MainDeploy.%m%d%y"`; why doesn't this work? It does in unix. Also what's the way I add a date to file name? I'd like to create the following convention. plantname.date.log Error.plant.date.log. _ MSN Photos is

to die, croke, or confess

2002-01-21 Thread Alex Harris
I need to place code that leaves my program entirely if certain errors occur (mostly on opening a file). However I don't want ANY messages going anywhere except my $errlog. (I noticed die, seem to always show a message at the command line). What's the best way to handle say the following th

to die, croak, or confess

2002-01-21 Thread Alex Harris
I need to place code that leaves my program entirely if certain errors occur (mostly on opening a file). However I don't want ANY messages going anywhere except my $errlog. (I noticed die, seem to always show a message at the command line). What's the best way to handle say the following the

catching an exception before it reaches command line

2002-01-17 Thread Alex Harris
The program I'm writing is going to run under a cron job. Therefore its important that I catch all exceptions in a file and not have them return to the command line. For instance the following: (system("ls *.r > $plantfile") raises this exception at times: ls: 0653-341 The file *.r does no

setting date to that of file copied

2002-01-14 Thread Alex Harris
I'm running a pgm that copies files over to a new system if they are old or do not exist. However, once I've copied the files to the new system, they read the date they were created vs the date of the original files I copied. How do I keep the date of those copied files the same as the orig

forkit

2002-01-14 Thread Alex Harris
I had the following in my program. `rsh $plant /u1/bin/forkit "/u1/bin/zwork.pl"` and it wouldn't let go until the second program completed. so I tried system("rsh $plant /u1/bin/forkit '/u1/bin/zwork.pl'" and still it won't let go. How do I fix this? __

split, ignoring spaces

2002-01-09 Thread Alex Harris
I'm doing the following to seperate out items: @date = split(/ /,$date); However, I keep ending up with a space in @date[3]. How do I totally eliminate spaces so only words/numbers appear in the array? _ MSN Photos is the easie

timestamp without the time

2002-01-08 Thread Alex Harris
How do I get the mm dd a file was created WITHOUT the time? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

date compare problems

2002-01-07 Thread Alex Harris
Ok so I'm REALLY REALLY a newbie and this next question is going to sound like "where's the spoon" so you can feed me but... Here's my code and the error I got. I know it means I'm suppose to include something but I'm not sure what. use File::stat; use Time::localtime; $date_string =

comparing dates

2002-01-07 Thread Alex Harris
if I use the following to get the date of a file: use File::stat; use Time::localtime; $date_string = ctime(stat($file)->mtime); print "file $file updated at $date_string\n"; I get: Mon Jan 7 10:21:21 2002 Now I want to compare another file date to this one getting the date

test and question

2002-01-07 Thread Alex Harris
I just joined and have a newbie question. How can I read in the date of a file (mmdd) AND then compare that to another date in Perl? I'm running of and AIX Unix machine. Please email me direct at [EMAIL PROTECTED] _ Chat w