Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. avashisht

    Convert Human Readable time to Epoch and then Back

    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
  2. avashisht

    Convert Human Readable time to Epoch and then Back

    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..
  3. avashisht

    Convert Human Readable time to Epoch and then Back

    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...
  4. avashisht

    Storing array or a hash into a text file

    Thanks Mikevh, that was usefull...
  5. avashisht

    Storing array or a hash into a text file

    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 =...
  6. avashisht

    Storing array or a hash into a text file

    I think I will go with DataDumpr.. better that way... Thanks all you guys... it was a great help
  7. avashisht

    Storing array or a hash into a text file

    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...
  8. avashisht

    Storing array or a hash into a text file

    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
  9. avashisht

    Storing array or a hash into a text file

    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

Part and Inventory Search

Back
Top