Re: some doubt

2003-12-12 Thread Jim Burnett
Yes, do a search on google. I did this. -Jim - Original Message - From: "Ajey Kulkarni" <[EMAIL PROTECTED]> To: "drieux" <[EMAIL PROTECTED]> Cc: "Perl Perl" <[EMAIL PROTECTED]> Sent: Saturday, December 13, 2003 6:20 AM Subject: some doubt

Some Doubt

2003-12-12 Thread Rob Dixon
Ajey Kulkarni wrote: > > How can i rename a file and check the size of file using perl? > Also is there a way to call unix commands/system calls from perl?(Say i > want to fstat() on a file and grab the stat struct results). Is there any > way?? You can grab the size of a file using the -s operato

File Operations and System Calls in Perl (WAS: some doubt)

2003-12-12 Thread Tim Johnson
rldoc -f rename That should get you started -Original Message- From: Ajey Kulkarni [mailto:[EMAIL PROTECTED] Sent: Saturday, December 13, 2003 3:21 AM To: drieux Cc: Perl Perl Subject: some doubt hi, How can i rename a file and check the size of file using perl? Also is there a way to

Re: some doubt

2003-12-12 Thread Rob Dixon
Ajey Kulkarni wrote: [some stuff] Before this gets lost as a subthread I'm reposting it. I hope I catch most potential responses. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Messing with Files [Was: some doubt]

2003-12-12 Thread Casey West
It was Saturday, December 13, 2003 when Ajey Kulkarni took the soap box, saying: : hi, : How can i rename a file and check the size of file using perl? Use the rename() function. rename( $oldfile, $newfile ); perldoc -f rename() Use the file test operators, particularly -s. my $size = -s

some doubt

2003-12-12 Thread Ajey Kulkarni
hi, How can i rename a file and check the size of file using perl? Also is there a way to call unix commands/system calls from perl?(Say i want to fstat() on a file and grab the stat struct results). Is there any way?? TIA -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: some doubt!

2002-11-12 Thread John W. Krahn
Pravesh Biyani wrote: > > hi Hello, > i have a prog which should create a file according to the date and name > it "$date.log" and write something depending upon other things in it! > Here is the code.. which refuses to work > > -- >

Re: some doubt!

2002-11-12 Thread Pravesh Biyani
thanks verymuch.. the prgm working fine now!! cheers pravesh Frank Wiles wrote: .--[ Pravesh Biyani wrote (2002/11/12 at 17:49:14) ]-- | | hi | i have a prog which should create a file according to the date and name | it "$date.log" and write something depending upon other things

Re: some doubt!

2002-11-12 Thread Paul
By the way, always check your return code. My suggestion would be to use open OUTFILE, $OUTFILE or die $!; --- Paul <[EMAIL PROTECTED]> wrote: > > | $probefile = " > | $OUTFILE = ">>$probe_logfile"; > > | open(probefile) or die("ERROR: $! \n"); > > | open(OUTFILE) or die ("ERRROR :$! \n

Re: some doubt!

2002-11-12 Thread Paul
> | $probefile = " | $OUTFILE = ">>$probe_logfile"; > | open(probefile) or die("ERROR: $! \n"); > | open(OUTFILE) or die ("ERRROR :$! \n"); > You're not using open() correctly. You need to have something > along the lines of: > open(PROBE, $profile); > open(OUT, $OUTFILE); Actu

Re: some doubt!

2002-11-12 Thread Paul
--- Pravesh Biyani <[EMAIL PROTECTED]> wrote: > i have a prog which should create a file according to the date > and name it "$date.log" and write something depending upon > other things in it! Here is the code.. which refuses to work > any clues.. ? > $prefix_file = ` date '+%x' ` ; accordin

Re: some doubt!

2002-11-12 Thread Frank Wiles
.--[ Pravesh Biyani wrote (2002/11/12 at 17:49:14) ]-- | | hi | i have a prog which should create a file according to the date and name | it "$date.log" and write something depending upon other things in it! | Here is the code.. which refuses to work | | any clues.. ? |

some doubt!

2002-11-12 Thread Pravesh Biyani
hi i have a prog which should create a file according to the date and name it "$date.log" and write something depending upon other things in it! Here is the code.. which refuses to work any clues.. ? TIA pravesh -- #!/usr/bin/perl -w