I have a Perl code which performs ftp-ing of files.
However, it seems like the variable $date_today is not passed on to this statement grep { /^ME.*JMR.*$date_today.*sorts$/ } and i can't ftp the files that i wanted.
Can any expert help me to debug this ?
Is there any thing wrong with my date syntax $date_today = `date '+%y%m%d'`; ?
Tried to put on the curly braces but doesn;t work.
I notice that when i do a print "$date_today, $date_yest\n"; after date_format() , notice that the output is the below. 081109
, 081108
Why would the variable $date_yest which is 081108 be printed out in the next line when i didn;t specify it to print at the next line ?
I strongly believe there's something wrong with the code $date_today = `date '+%y%m%d'`;, but i just do not know what is the correct syntax.
$beginDate = substr(DateCalc("today", "-7Days"),0,8);
This fetches the date 7 days back
Can I fetch the date before 7 years from todays date in Perl using same syntax
Use code tags, see PM. (3 Replies)
Hi All,
what i want to do in perl is i should give the date at run time .Suppose date given is 23/12/2011(mm/dd/yyyy) the perl script shold find week start date, week end date, previous week start date,end date,next week start date, end date. In this case
week start date will be-:12/19/2011... (2 Replies)
Hi All,
Want to get all dates and Julian week number for that date between the start date and end date. How can I achive this using perl?
(To achive above functionality, I was connecting to the database from DB server. Need to execute the same script in application server, since databse... (6 Replies)
Hi ,
This script working for fine if pass script-name.sh Jul/10/2007 ,I want to pass 20070710(yyyymmdd) .Please any help it should be appereciated.
use Time::Local;
my $d = $ARGV;
my $t = $ARGV;
my $m = "";
@d = split /\//, $d;
@t = split /:/, $t;
if ( $d eq "Jan" ) { $m = 0 }... (7 Replies)
im having trouble with this... i can do it in awk but perl is giving me trouble.
i want to test for the previous 3 days, today, and the coming three days.
heres the code:
#!/usr/bin/perl
chomp($info=`date +%b%d`);
$info =~ tr///;
if ($info =~ m/^(*)()$/) {
$info = "$1.0.$2";
} ... (4 Replies)
I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.
$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
really appreciate any help.
thanks
mkneni (4 Replies)