or ( my $index = 0; $index <= $#files; $index++ )
{
}
And then just use $files[$index] wherever you use $_ below, and then
you can refer to as many other elements in the array as you like with
"$index + 1", "$index - 1", etc.
Hope this helps,
Jeff Eggen
IT Programmer Analyst
Saskat
int line numbers:
perl -ne 'print "$. $_" if m/some pattern/' my_file.txt
Or, say I want to rip through a file that is just a plaintext table of
info with a column I want to sum:
perl -ne '$total+=(split)[columnnumber];END{print $total}' my_file.txt
Hope this helps,
>>> Tim Wolak <[EMAIL PROTECTED]> 06/01/2005 3:59:26 pm >>>
>Hello all,
>I am in need of a quick way to get the current date in the MMDD
>format. This is something I would like to understand better on how to
>get the date with perl. Any suggestions would be most welcome.
As per the perlch
are unblocked the signal handler for TERM should be entered,
and that would cause the program to exit. Is it my logic that's wrong,
or is the code doing something funky?
Thanks,
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
*
the "g" modifier on your regex?
while (/\(.*?)<\/FONT>/g)
{
print $1, "\n";
}
Does it pick up the rest then?
Hope this helps,
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
DISCLAIMER***
differ.pl line
19,
> line 1."
Does your file have a header that you should be ignoring? Your error
above says it's at the first line of your input file.
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
DISCLAIMER**
to go through to pick it
up myself?
Thanks,
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
DISCLAIMER*
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the in
as then I could do this pretty simply. Maybe rewriting
the bugger isn't such a bad idea...
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
DISCLAIMER*
This e-mail and any files transmitted with it are confidentia
directly, since bad things can happen if you trash your shadow
file. Try this:
for userid in `cat cleanup.txt`
do
echo "locking user $userid"
passwd -l $userid
done
This should work. The "passwd -l $userid" will lock the account for
you.
Jeff Eggen
IT Programmer Analyst
Saskatch
er /
linker uses another method to actually load the library. I created the
symlink, and everything worked okay after that.
Hope this helps,
Jeff Eggen
IT Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
This e-mail and any files transmitted with it are confiden
\s)#./$1#;
open(FOO, "< $file\0");
Change your open call to use the three argument version and you should be fine.
Hope this helps,
Jeff Eggen
IT Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
This e-mail and any files transmitted w
ty comes to mind.
http://search.cpan.org/~dskoll/MIME-tools-5.417/
Hope this helps,
Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email [EMAIL PROTECTED]
DISCLAIMER*
This e-mail and any files transmitted with it are confidential and inten
# The "or die" is the preferred way of checking open success, by the
way
# Also, note the use of "$!" to determine failure cause
open DNAFILE, $file or die "Cannot open file: $!";
my $dna = join '', ;
close DNAFILE;
# Now we get rid of any newlines
$d
r method / function in the toolkit? I'm looking through the docs
and the "Perl Template Toolkit" book by O'Reilly, but haven't seen
anything yet. If anyone could point me in the right direction, I'd
appreciate it.
Thanks,
Jeff Eggen
IT Programmer Analyst
Saskatch
14 matches
Mail list logo