aaaah,
got it solved,....
($mon, $dd, $yy) = (split('/', $date));
should be like this:
($yy, $mon, $dd) = (split('/', $date));
That's it...
date format was: yyyy(-/)mm(-/)dd and not the other way round
Yes that variable is passes properly and i have a debug log that gets generated whenevr the apps reaches this subroutine. as i am still debugging i have a debug log for practically every line..
Hi people,
I am trying to parse 2 parameters to a subroutine in a Perl/cgi app; to convert the normal time to epoch time, add no of seconds supplied and then convert that back to normal date format.
for some reason, by shell the subroutine works but not when put in the Perl/Cgi app where it is...
seems like i have a question that needs to be answered again,
I used the DataDumper mode:
use Data::Dumper;
$Data::Dumper;
print Dumper(%ENV);
now the output looks something like this:
$VAR5 = 'DBDIR';
$VAR6 = '/var/spool/Tivoli/tmrdev200.db';
$VAR7 = 'NO_J2D_DGA';
$VAR8 = 'true';
$VAR9 =...
How abt this...
this serves my purpose, although the output file is not that cleanly formatted, but i had to run it once and i guess is pretty easy even for a newbie !!!!!
#!/usr/bin/perl
@array1 = (%ENV);
open (FILE, ">/tmp/ashish.tmp") or die "error opening file for writing...
you have to be very detailed andrew.. sorry abt that...
what ever it takes to get this out in the text file will be good,,
here is what i want to get into text file:
foreach $key (sort(keys %ENV)) {
print "$key = $ENV{$key}\n"
@array1 = keys(%ENV);
}
Thanks
Avashisht
Hi,
I am veeeery new to perl..
i have a script where i am outputting the Environment variable to a HASH.
either i want to output hash values into a text file,
Or
get hash into an array and then print the array into the text file../
thanks
avashisht
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.