Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Please advice

by perl.j (Pilgrim)
on Aug 10, 2011 at 21:31 UTC ( [id://919749]=note: print w/replies, xml ) Need Help??


in reply to Please advice

Well, if you are asking us to make the code, your probably out of luck.
--perl.j

Replies are listed 'Best First'.
Re^2: Please advice
by Anonymous Monk on Aug 11, 2011 at 00:35 UTC

    Monks, It is not my endeavour to get the code written from you. Definitely I need help. I beleive all of you will help me out! Kindly help me as of now for how to look for sub directories under a sub directory and then taking the time stamp of all files under that sub directory and then matching the timestamp Please guide me here!

      Did you read the documentation for File::Find yet? If so, what part of using File::Find can we clarify for you?


      Dave

        I tried to do this

        se strict; use warnings; use Data::Dumper; use Switch; use File::stat; use Time::localtime; use POSIX (); print ("Enter the directory name and date as input arguments:"); my $which_directory; my $which_date; ###$tm = localtime; my $mtime; my $file; $which_directory = $ARGV[0]; print (" The first argument is $ARGV[0]\n" ) ; $which_date = $ARGV[1]; print (" The secnd argument is $ARGV[1]\n"); die("Nothing entered as directory path name\n") if ($which_directory e +q ""); die("Nothing enetered as update date\n") if ($which_date eq ""); opendir(DIR,$which_directory) || die "Error in opening dir $which_d +irectory\n"; my @dir = grep { !/^\.+$/ } readdir(DIR); my $i = 0; foreach (@dir) { readdir($ARGV[0] . "/" . $dir[0]); $mtime = (stat ($file))[9]; print " Time--->" . ($mtime).$file . "\n"; print "Last change:\t" . ($mtime).$file . "\n"; $i++; } closedir(DIR);

        $ perl test_ash.pl /var/opt/nexius/cm/westtr3/oss/ericsson 01/01/2011 Enter the directory name and date as input arguments: The first argument is /var/opt/nexius/cm/westtr3/oss/ericsson The secnd argument is 01/01/2011 Bad symbol for filehandle at test_ash.pl line 39.

        Is there any other approach for reading and entering into the subdirectory ? I saw the File::Find but did not get anything of relevance! . Please guide

        Hi Monks, I am trying to beautify perl code on linux. I am having linux o/s and I have written .pl files I tried the following command perltidy somefile.pl but it is not working. What should I do?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://919749]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2024-04-18 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found