On Jun 20, 9:10 am, [EMAIL PROTECTED] (Ravi Malghan) wrote:
> Hi: I am trying to extract some stuff from a string and not getting the
> expected results. I have looked
> throughhttp://www.perl.com/doc/manual/html/pod/perlre.html and can't seem to
> figure this one out.
> I have a string which is
> I am looking at a way of reading a line doing a regex to find the
> specific line then pick out the line, sudo code would be some thing
> like the following:
>
> read in line
> check regex
>
> if regex is correct
> {jump 10 lines
> print the output
>
> }
>
> any ideas on jumping the 10 li
On Jun 30, 8:01 am, [EMAIL PROTECTED] (Cheez) wrote:
> Howdy, scripting with perl is a hobby and not a vocation so i
> apologize in advance for rough looking code.
>
> I have a very large list of 16-letter words called
> "hashsequence16.txt". This file is 203MB in size.
>
> I have a large list of
what this does: it classifies a file based on its modification date.
example: xfile1 is dated July 9, 2008. If it doesn't exist, the
program creates a
directory structure 2008/July/09 and places xfile1 there.
Then it creates a log with the steps done.
So...in the system the result is 2008/July/0
On Jul 10, 8:36 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> icarus wrote:
> > what this does: it classifies a file based on its modification date.
>
> > example: xfile1 is dated July 9, 2008. If it doesn't exist, the
> > program creates a
> > directory struc
perl 5.8.2
OS: AIX fully POSIX compliant
my script moves files from one dir to another.
When I want my script to stop, should I pass it along the signal INT
or TERM?
INT just interrupts the script. It finishes whatever it's processing
and then it's done.
TERM on the other hand, just sends a TER
I'm trying to all count files in a home dir and all subdirs *except* a
subdir called 'backup'.
How do I that? thanks in advance.
#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
my $dir = ("/home/foo");
my $counter = 0;
find( { wanted => \&process, no_chdir => 0 }, $dir );
sub proce
hi are you doing everybody...
How can I sort files by timestamp without slurping?
the idea is to look into a directory, pick up the oldest first and so
on until the 'youngest' one.
file100..all the way to file1.
I found this solution somewhere,
my @sorted = map { $_->[0] }
sort { $b
scalar context such
as reading a dir using while () ] , it has to be an array.
use strict;
use warnings;
my $path = "/home/icarus/files";
my $time_var = "-M";
opendir (MYDIR, $path) or die $!;
#from older to newest. If you want from newest to oldest, switch the
$b for $a
Hi,
I want to display 'canada', 'cane', 'canine, 'ca.e.02'.
Problem: It only displays 'canada'
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = ("canada", "cane", "cane02", "ca.e.02", "canine",
".hidden");
foreach $file (@xfiles){
#want canada only for this iteration
I have two files: log_ca.txt and log_aa.txt
contents of log_ca.txt:
3->ca_filename3
4->ca_filename4
1->ca_filename1
2->ca_filename2
contents of log_aa.txt:
1->aa_filename1
3->aa_filename3
2->aa_filename2
4->aa_filename4
The program
'-' x 27, "\n";
foreach (sort { $a cmp $b } keys(%final_report) ){
print "$_ => $final_report{$_}\n";
}
Now it prints the output just fine.
Thanks again.
On Apr 24, 2:12 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> icarus wrote:
> > I have
12 matches
Mail list logo