Hi Lilly,
Good Luck,
Write me for any help in C, C++, Perl, PHP and UNIX related stuff. I will answer you with in the time with free of cost.
Rammohan Alampally,
HP Technologies
Bangalore
User Profile
Collapse
-
Last edited by eWish; Jul 17 '08, 03:36 AM. Reason: Please do not use BOLD tags for your entire post. -
HI Ramesh,
Have a look at the following sample code and you can replace what I have placed for you....
Snippet#1
Snippet#2Code:$string1 = "I love to eat apples all day. I can eat apples every day! Apples are yummy!"; $string1 =~ s/apples/oranges/g; print "The resulting value is : $string1 \n";
...Code:$string1 = "today is the best day of all";
Leave a comment:
-
...Code:###################################### # subroutine delete file ###################################### sub Delete { $out="cgi-bin/order/$ENV{'REMOTE_ADDR'}.txt"; open OUT, "$out" or die "Cannot open $out for write :$!"; read(OUT,$oldstuff,10000); close OUT; @changes=split(/n/,$oldstuff);Leave a comment:
-
Comments:Code:#!/usr/local/bin/perl use strict; foreach (glob ("C:\\Ram\\Bangalore\\Log\\*.log")) { my $result = -M; if ($result > 4) { print "$_ is over 4 days old...removing\n"; unlink $_; } }
Hi Venkat,
This script will automatically delete all log files whose age is more than 4days from the mentioned folder....Leave a comment:
-
Comments:Code:#!/usr/local/bin/perl use strict; foreach (glob ("C:\\Ram\\Bangalore\\Log\\*.log")) { my $result = -M; if ($result > 7) { print "$_ is over 7 days old..removing\n"; unlink $_; } }
This script will automatically delete all log files whose age is more than 7days from the mentioned folder.
Write...Leave a comment:
No activity results to display
Show More
Leave a comment: