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

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 =

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] http://learn.perl.org/ http://learn.perl.org/first-response

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

2003-12-12 Thread Tim Johnson
-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 call

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 operator on

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 hi, How can i rename a file and check the size of file

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

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.. ? |

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' ` ; according to

Re: some doubt!

2002-11-12 Thread Paul
| $probefile = probe.log ; | $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);

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 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 --