Excuse my ignorance here, I have what is probably a simple question.
I want to pull apart my Apache combined log into individual Vhost reports
that I can run through Analog.
I can manually do this by grepping the file for the vhost name.
What I'd like to do is have a Perl script read the list
Not trying to reinvent the wheel.
I am using Analog for the analysis.
I am trying to split the server combined log into individual vhost logs. I
can then run each through Analog to produce individual reports.
---
Jeremy SchwartzStarmark
I am not handling this at the Apache level because I have about 40+
different sites running on this one box. I want to be able to run server
wide statistics from the 'master' log file, then I want to strip it apart
into the separate pieces, pipe that piece to Analog and dump the results
into the
On Monday, February 3, 2003, at 10:32 AM, [EMAIL PROTECTED] wrote:
Something along the lines of:
#!/bin/sh
for dir in `ls -1 /webroot/`; do
cat /var/log/httpd/access_log | grep $dir
/var/log/httpd/access_log_$dir
done
Tip - whenever 'cat' is the first command in a pipeline, it should
Sheesh.
Wil ya'll just help a man with a perl problem instead of battering him with
other ways to do it?
Sometimes people like ot pose a challenge to themselves and see if it can be
done.
Instead of being counterproductive and refering peopel to other things, help
the man!
I wish I could but
Hi there,
Can anyone point me to some good resources for learning perl?
I have the book Javascript, CGI and Perl, but want some online material as
well
Regards
Anthoni
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 4 Feb 2003 00:14:30 -0900, Dennis Stout [EMAIL PROTECTED] wrote:
Sheesh.
Wil ya'll just help a man with a perl problem instead of battering him with
other ways to do it?
At least one of these lists is a beginners list, the other is
you can go there
http://learn.perl.org/
http://perldoc.com/
or search deeper in the google 'arcanes'
for some (quite) illegal online books...
Anthoni wrote:
Hi there,
Can anyone point me to some good resources for learning perl?
I have the book Javascript, CGI and Perl, but want some
Where can I get my hands on split-logfile. Based on the info at the link
below, it seems to be exactly what I am looking for.
---
Jeremy SchwartzStarmark
Interactive Developer
[EMAIL PROTECTED]954-761-1600
From: pkeidesis [EMAIL
Can anyone point me to some good docs for using cookies with Perl/CGI. I can
only seem to find docs using Javascript. I have already read the cgi.pm
docs, but looking for something with more info.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
On Tue, 4 Feb 2003 16:22:17 -0500, Kipp, James [EMAIL PROTECTED] wrote:
Can anyone point me to some good docs for using cookies with Perl/CGI. I can
only seem to find docs using Javascript. I have already read the cgi.pm
docs, but looking for
Hi all,
I'm just learning perl and would like to know how to print the contents of
an array, without printing any of the elements in the array that might be
empty.
For instance:
I'm parsing info in from a form:
$day2 = $field{'x_Day2'} ;
$day3 = $field{'x_Day3'} ;
$day4 = $field{'x_Day4'} ;
I'm just learning perl and would like to know how to print the contents of
an array, without printing any of the elements in the array that might be
empty.
foreach (@days) {
unless =~ // print;
}
I do believe will do it.
Dennis Stout
For instance:
I'm parsing info in from a form:
Thanks, Dennis! You pointed me in the right direction.
foreach $my_element(@alllegs) {
unless ($my_element eq '')
{print $my_element br \n;}
}
Works like a champ!
Jan Cohen
- Original Message -
From: Dennis Stout [EMAIL PROTECTED]
I'm just learning perl and would like to know how
Hi all, newbie here again,
Here's a sample of some code that's confusing me:
#if ($selectRide = LibertyRider2 || RiderGroup)
# {foreach $my_element(@alllegs) {
# unless ($my_element eq '')
# {print $my_element br \n;}
# }
# }
#else
# {print You\'re good for the whole ride, Coast to Coast!br
Jan Cohen wrote:
Hi all, newbie here again,
Here's a sample of some code that's confusing me:
#if ($selectRide = LibertyRider2 || RiderGroup)
Two key mistakes. First = is assignment, == is equality for numbers, and
'eq' is equality for strings, so essentially you are saying if you can
set
hi everyone...
I guess this problem is less related to perl (though it might be) and
more related to HTTP...
I'm trying to write a program that sends an HTTP request (using
LWP::UserAgent::Request) to a server (web.icq.com, which i know is
working fine), but all i get in status_line is 500 Can't
Eri Mendz wrote:
hello everyone,
since im learning perl, i might as well harness its power to solve my
small real-world problem. sample lines of my grep'ped ppp log goes
like this:
Jan 12 05:47:50 localhost pppd[8696]: Connect time 2.2 minutes.
Jan 12 19:23:44 localhost pppd[9359]: Connect
Hi,
how can I check if my perl is thread enabled?
I ´m using 5.6.1.
Which Modul to use and where to find?
(if not cpan)
use threads or use Thread? Which is which?
Thanx!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To all you perl gurus out there...
I've got this file named schedule.pl...in the interest of
troubleshooting my problem, I've thinned
my script to the following code...
#!/usr/bin/perl
print HTML\n;
print HEAD\n;
print TITLEPerl Test Page/TITLE\n;
print /HEAD\n;
print BODY\n;
Here's the code...
#!/usr/bin/perl
print HTML\n;
print HEAD\n;
print TITLEPerl Test Page/TITLE\n;
print /HEAD\n;
print BODY\n;
print Perl Test Page\n;
print /BODY\n;
print /HTML\n;
when I run it from the command line, it runs fine and prints out the
results, but I get a 500
On Monday, February 3, 2003, at 02:13 PM, Sam Mauntz wrote:
#!/usr/bin/perl
print HTML\n;
print HEAD\n;
print TITLEPerl Test Page/TITLE\n;
print /HEAD\n;
print BODY\n;
print Perl Test Page\n;
print /BODY\n;
print /HTML\n;
My problem is that when I try to run it from a browser
On Tue, 4 Feb 2003 09:40:25 +0100, [EMAIL PROTECTED] (Angerstein) wrote:
Hi,
how can I check if my perl is thread enabled?
I ´m using 5.6.1.
Which Modul to use and where to find?
(if not cpan)
use threads or use Thread? Which is which?
This is from perl5.8's perlthrtut:
(By the way, look at
On Tue, 4 Feb 2003 01:58:28 -, [EMAIL PROTECTED] (Anthoni) wrote:
Hi there,
Can anyone point me to some good resources for learning perl?
I have the book Javascript, CGI and Perl, but want some online material as
well
Go to http://perlmonks.org and look thru their tutorial section.
--
To
DOHT! Ya that would do it wouldn't it.
Thanks.
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 6:16 PM
To: Perl
Subject: Re: Sorting Hash of arrays by how many elements
From: Paul Kraus [EMAIL PROTECTED]
This is straight from the
Hi, I want to sort a hash based on the employee number; I used a foreach
loop but it sorts the hash based on the ascii value. How would I get it
to sort on integer values?
foreach $empNo (sort (keys(%empName))) {
print $empNo $empName{$empNo}\n;
}
--
Rob
--
To unsubscribe, e-mail:
Eri Mendz wrote:
hello everyone,
Hello,
since im learning perl, i might as well harness its power to solve my
small real-world problem. sample lines of my grep'ped ppp log goes
like this:
Jan 12 05:47:50 localhost pppd[8696]: Connect time 2.2 minutes.
Jan 12 19:23:44 localhost
perldoc -q sort
foreach $empNo (sort {$a=$b} keys %empName) {
On Tue, 2003-02-04 at 08:17, Rob wrote:
Hi, I want to sort a hash based on the employee number; I used a foreach
loop but it sorts the hash based on the ascii value. How would I get it
to sort on integer values?
--
To
I have a problem can you help?
I have develop a program but need it to run a number of different scripts
ready 3 mins on a file that will grow. Can anyone help me with this problem.
--
Thank You
Benjamin Jeeves
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Hello everyone.
I have been looking for a script that allows people to upload images and let
them be rated in a given sacale by some visitors. I don't mean a poll.
I haven't anything Perl, but a very expensive script.
Given this I may try to write one. I guess a good beggining would be to
learn
I would check out www.perlmonks.org.
They have a voting system for posts that would probably work for the exact purpose
that you are looking for. I am sure that you can get some good hints. Great group of
people there!
Kerry LeBlanc
Materials Auditor
Process Owner
75 Perseverence Way
Does anyone know of any modules that will display Barcodes? I know about
Barcodemill.com already but Im looking for something affordable or free. Ive played
with the popular barcode.pm, but that creates an actaully EPS or PNG file, I just want
to display barcodes in an HTML file.
thanks!
On Sat, 01 Feb 2003 06:58:16 +, Mario Kulka wrote:
I found the following in a book when trying to find out the file's MIME
type, but it doesn't work. Am I missing something obvious? Thanks. M.
code:
#!/usr/bin/perl -W
use CGI ':standard';
$file = param('music_file');
$info =
On Mon, 03 Feb 2003 10:29:14 -0500, Paul Kraus wrote:
I have an array that I want to remove every instance of '$' and all
leading and trailing white space.
My code only seems to remove '$'. I know I can split this into separate
commands but is there a way to do this all at once?
Erm, I don't
On Sun, 02 Feb 2003 18:58:49 -0500, Wiggins D'Anconia wrote:
Konrad Foerstner wrote:
while (INPUT) {
if (/^#/) {
# start new array element
push @array, $_;
}
else {
# append to last array element
$array[$#array] .= $_;
Or simpler
$array[-1] .=
I was wondering if anyone had any ideas on how to parse a datafile with
fixed length records but no carriage returns. All records are on one line.
There are 3 fields per record the first is 10 spaces, the second is 15 and
the third is 40 then it starts back with 10 again.
Any help would be
I don't get any errors. The only problem is that $type prints out as empty.
Script executes fine; $info (after submitting a .txt file) prints to the
browser as: HASH(0x821b428)
HTML part:
form name=form1 method=post action=../../cgi-bin/b/s_le2.cgi
musicinput type=file name=music_file
/form
Just off the top of my head:
my @records = ();
while($_ =~ /(.{10})(.{15})(.{40})/g){
push(@records,[$1,$2,$3]);
}
Or soemthing like that. It basically matches 10 characters followed by 15
characters followed by 40 characters and then pushes the fields to an array
of arrays so that you have
.--[ Christopher M Burger wrote (2003/02/04 at 10:51:56) ]--
|
| I was wondering if anyone had any ideas on how to parse a datafile with
| fixed length records but no carriage returns. All records are on one line.
| There are 3 fields per record the first is 10 spaces, the second
I found the problem. Pls disregard my last email. Thanks for all your help.
Mariusz
PS. My HTML was incomplete. It was missing: enctype=multipart/form-data
From: Wiggins d'Anconia [EMAIL PROTECTED]
To: mario kulka [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: file's MIME type
Date:
Christopher M Burger wrote:
I was wondering if anyone had any ideas on how to parse a datafile
with fixed length records but no carriage returns. All records are
on one line.
The read() function lets you read a fixed block of bytes.
There are 3 fields per record the first is 10 spaces,
the
On Feb 4, Bob Showalter said:
Christopher M Burger wrote:
I was wondering if anyone had any ideas on how to parse a datafile
with fixed length records but no carriage returns. All records are
on one line.
The read() function lets you read a fixed block of bytes.
So does the operator, if
Christopher M Burger wrote:
I was wondering if anyone had any ideas on how to parse a datafile
with fixed length records but no carriage returns. All records are
on one line. There are 3 fields per record the first is 10 spaces,
the second is 15 and the third is 40 then it starts back with 10
What about a tutorial or guide for using DB_file??
- Original Message -
From: Le Blanc, Kerry (Kerry) [EMAIL PROTECTED]
To: 'Ramón Chávez' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 8:52 AM
Subject: RE: DB_file tutorial and rating script
I would check out
Hi All
Why does the command 'print (localtime(time))[4];' does not work
And the following 2 lines do work
'[my $temp = (localtime(time))[4];
Print $temp;'
Is there away to avoid the temporary variable ?
Roiy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
On Tue, 4 Feb 2003 10:36:39 -0600, Ramón Chávez [EMAIL PROTECTED] wrote:
What about a tutorial or guide for using DB_file??
Have you read the docs??
http://search.cpan.org/author/PMQS/DB_File-1.806/DB_File.pm
I have not used the module
On Tue, 4 Feb 2003 18:51:16 +0200 , Zysman, Roiy [EMAIL PROTECTED] wrote:
Hi All
Why does the command 'print (localtime(time))[4];' does not work
And the following 2 lines do work
'[my $temp = (localtime(time))[4];
Print $temp;'
Is there
Well,
I was actually answering the part of the question that dealt with a rating system.
Since you asked, I would recommend that you read the documentation at:
http://search.cpan.org/author/PMQS/DB_File-1.806/DB_File.pm
Reading the documentation is always the first REQUIRED step. After that,you
Hi,
While uploading a file my $type outputs as audio/mpeg
What's the simplest way to extract just the extension (in this case mpeg)?
I thought to do this:
($not_needed,$extension) = split;
But can
$type = $info-{'Content-Type'}
output something in other formats with more elements? (e.g.
Hi,
Well, the first problem I sorted by a simple check, to see if the last
character was a *, if not, it would check just the end of all the strings.
If so, it would scan the entirity of all the strings. The code
$mask =~ s/\*//g;
was to remove the *'s so the regex wouldn't scan the string for
Thanks for all the info. Basically what I'm trying to acomplish is to
somehow get the extansion of the file so after renaming it I know what
extension (subtype) I should assign to it.
How people usually do that? Would extracting the subtype from the path (the
file name) be a good idea? I would
Roiy Zysman wrote:
Hi All
Why does the command 'print (localtime(time))[4];' does not work
And the following 2 lines do work
'[my $temp = (localtime(time))[4];
Print $temp;'
It pretty much tells you why when you compile it:
print (...) interpreted as function at E:\Perl\source\xx.pl
From: [EMAIL PROTECTED]
On Tue, 4 Feb 2003 18:51:16 +0200 , Zysman, Roiy
[EMAIL PROTECTED] wrote:
Hi All
Why does the command 'print (localtime(time))[4];' does not work And
the following 2 lines do work '[my $temp = (localtime(time))[4];
On Feb 4, Rob Dixon said:
If you set the input record separator variable to a number, it will do
fixed-length reads from the file. THen you can use 'unpack' to split
each record into its constituent fields. Try like this:
As per my response, it must be a REFERENCE to a number:
$/ = 65;
On Feb 4, Zysman, Roiy said:
Why does the command 'print (localtime(time))[4];' does not work
Others (like Jenda) have already told you. Here is one solution:
print +(localtime)[4];
You don't need to use time(), by the way -- it's the default argument to
localtime().
--
Jeff japhy Pinyan
I am trying to extract .jpg (subtype of the file) from the string:
c:\my_files\file.jpg
I found the following pattern on the net:
$file =~ s/.*[\/\\](.*)/$1/;
which extracts the file name (file.jpg). I understood most of that pattern
except what does the (.*) part does? And how can I tweak it
I am trying to extract .jpg (subtype of the file) from the string:
c:\my_files\file.jpg
I found the following pattern on the net:
$file =~ s/.*[\/\\](.*)/$1/;
which extracts the file name (file.jpg). I understood most of that pattern
except what does the (.*) part does? And how can I
mario kulka wrote:
I am trying to extract .jpg (subtype of the file) from the string:
c:\my_files\file.jpg
Mario, I didn't mean to mislead you. Here it _is_ proper to speak of file
extension (or suffix). In the context of a MIME Content-type header like
text/plain, the plain is a subtype, not
I am trying to justify to my sys admin office reasons to upgrade our
archaic systems from perl4 (4.0.1.8) to at the very least perl 5.004. Does
anyone have any info, or references of possible security issues with perl 4?
Or perhaps some other dangerous bugs that have been fixed since the perl4
On Tue, Feb 04, 2003 at 12:52:13PM -0600, Jensen Kenneth B SrA AFPC/DPDMPQ wrote:
I am trying to justify to my sys admin office reasons to upgrade our
archaic systems from perl4 (4.0.1.8) to at the very least perl 5.004.
Wow! That brings back memories. 4.018 is over 11 years old.
By the
Hi all,
I am trying to check for a valid year in a field.
The data is :
02chevy
02 chevy
2chevy
chevy
my regex is as follows but does not work-
$newyr = substr($yr[0],0,2);
if ($newyr =~ /([0-9])/) {
then do stuff
It is not catching the second number correctly.
Results are;
02
02
2c
First I thought this message must have got here through some time
warp. I remember seeing similar five years ago and even then the
responses were oh my god, someone is still using THAT??? :-)
From: Paul Johnson [EMAIL PROTECTED]
Despite being a .0 release, 5.8.0 has proved remarkably robust.
Ken,
The fact that our military is still using something THAT antiquated and bug
riddled is embarassing. I realize that for many things, cost is involved
and it makes it harder to push through. Perl is free! Although if the
A.F. wishes, I'd be happy to install it for them for a whole lotta
On Tue, 4 Feb 2003 14:36:01 -0500 , Ned Cunningham [EMAIL PROTECTED] wrote:
Hi all,
I am trying to check for a valid year in a field.
The data is :
02chevy
02 chevy
2chevy
chevy
my regex is as follows but does not work-
$newyr
02chevy
02 chevy
2chevy
chevy
my regex is as follows but does not work-
$newyr = substr($yr[0],0,2);
if ($newyr =~ /([0-9])/) {
It is not catching the second number correctly.
are you just trying to match 2 digits in the substr?
Try if ($newyr =~ /( \d{2} )/)
--
To
are you just trying to match 2 digits in the substr?
Try if ($newyr =~ /( \d{2} )/)
get rid of the spaces, it was just for clarity. or use /x to ignore the
spaces
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thus spoke Wiggins d'Anconia [EMAIL PROTECTED] last [2003-02-04 14:04]:
[snip]
Use of uninitialized value in concatenation (.) or string at
./diamond-optr.pl line 15, line 22.
This looks like it might be caused by lines in your log file that do not
have 8 space delimited fields, in
Little more background,... I just PCS'd to this organization last September,
coming from a previous assignment where the systems were actually up to date
(kind of, purl 5.6.1) . Started learning the systems here and saw they were
doing some things in shell scripts that perl could do MUCH faster
I've written some Perl code that will make use of LDAP modules and will do
an LDAPSEARCH to a specific ldap server. However, I would like to know the
time take to complete the LDAPSEARCH so I can graph the response time.
What can I do within Perl to measure the completion time of the search ?
Any
For displaying a specific type of barcode I've used a font found at
idautomation.com The script that I used follows, although I noticed that
Randall answered your question as well and I'm sure his column goes into
much better detail then what I have. Basically this uses a font that must
be on
From: Distribution Lists [EMAIL PROTECTED]
I've written some Perl code that will make use of LDAP modules and
will do an LDAPSEARCH to a specific ldap server. However, I would like
to know the time take to complete the LDAPSEARCH so I can graph the
response time. What can I do within Perl to
Hello,
I have some code using TK. I used perlapp to compile my code, but the
external images will not compile into the exe file.
How can I include them in the compiler or how can I embed the image within
my perl code ?
$img = $top-Photo(-file = ('smfig44.bmp'));
--
To unsubscribe, e-mail:
Eri Mendz wrote:
dear wiggins and all,
first off, thanks for your replies. you guys are very helpful.
yep i found the errant lines in the log causing the problem. i deleted
them lines and errors gone. i wasn't able to improve much the script i
started. its kinda hard dividing my
I know that Kerry. Actually I was asking to the rest of the crew.
Tnak you very much.
I have read
http://www.iar.unlp.edu.ar/~fede/revistas/lj/Magazines/LJ35/1381.html
It's really more illustrative than
http://search.cpan.org/author/PMQS/DB_File-1.806/DB_File.pm as it (the
first) lets it clear
Hello,
I have a script that generates a pdf file from html.
It generates it for viewing perfect.
It will email it also.
However when I email it a .dat extension is added and it won;t work in Acrobat.
If I view the source of the view version and viwe the source of the dat file they seem
How does one do this?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Feb 4, Jamie Risk said:
How does one do this?
perldoc -f require
--
Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
stu what does y/// stand for? tenderpuss why, yansliterate of course.
[
Look at the perl function require() for this.
Rob
-Original Message-
From: Jamie Risk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 5:11 PM
To: [EMAIL PROTECTED]
Subject: including subroutines from other files ...
How does one do this?
--
To unsubscribe, e-mail:
This is how I've done this for my scripts:
do /filename;
Then I just call the sub in the normal method.
-Original Message-
From: Jamie Risk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 2:11 PM
To: [EMAIL PROTECTED]
Subject: including subroutines from other files ...
Jamie Risk wrote:
How does one do this?
To go along with the 'require' previously mentioned (especially if you
are having trouble sleeping):
perldoc -f use
perldoc -q 'require'
perldoc perlmod
perldoc perlmodlib
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I am having trouble sending a command wihtout waiting for a response.
After I telnet in I send a command
GET_STATS return
return
then the data prints out.
However when I try to send the command like this:
$t-cmd(GET_STATS);
it times out becasue I think it is waiting for a response, however no
Help,please...!, I'm dead in the water trying to understand why I'm unable to
reference hash entries in what *I consider* to be a fairly straightforward manner.
Any help/pointer is appreciated.
The hash entries *must* exist because I can reference and print them using a literal
key (or within
Karl Kaufman wrote:
Help,please...!, I'm dead in the water trying to understand why I'm unable to reference hash entries in what *I consider* to be a fairly straightforward manner. Any help/pointer is appreciated.
The hash entries *must* exist because I can reference and print them using a
David O'Dell wrote:
I am having trouble sending a command wihtout waiting for a response.
After I telnet in I send a command
GET_STATS return
return
then the data prints out.
However when I try to send the command like this:
$t-cmd(GET_STATS);
it times out becasue I think it is waiting for a
Hello.
I have a script that parses csv files for the occurence of an IP address that is
passed to the script as an argument when it runs. Currently, I can only run the script
from within the same directory as my data files. I would like to be able to move my
csv files into a separate data
I am trying to get the mtime of a bunch of files and directores. However,
it fails after the first two files/dirs. I don't see why it should. I am
an experienced sysadmin and a beginner Perl coder (obviously).
Help.
Source code:
#!/usr/bin/perl -w
use strict;
use File::Find;
use
On Feb 4, Karl Kaufman said:
$device{server1}: x1x
$_: xserver1x
Use of uninitialized value at ./devicesWIP line 198.
$device{$_}: xx
print '$device{server1}: x' . $device{server1} . x\n;
print '$_: x' . $_ . x\n;
print '$device{$_}: x' .
Jeff 'japhy' Pinyan wrote:
On Feb 4, Zysman, Roiy said:
Why does the command 'print (localtime(time))[4];' does not work
Others (like Jenda) have already told you. Here is one solution:
print +(localtime)[4];
You don't need to use time(), by the way -- it's the default argument to
On Feb 4, R. Joseph Newton said:
Jeff 'japhy' Pinyan wrote:
On Feb 4, Zysman, Roiy said:
Why does the command 'print (localtime(time))[4];' does not work
Others (like Jenda) have already told you. Here is one solution:
print +(localtime)[4];
You don't need to use time(), by the way
Sure lots of ways, this is Perl ;-)...
Jose Malacara wrote:
Hello.
I have a script that parses csv files for the occurence of an IP address that is passed to the script as an argument when it runs. Currently, I can only run the script from within the same directory as my data files. I would
Jose Malacara wrote:
opendir(DIR, .);
my @files = readdir(DIR);
How about:
opendir (DIR, ../adm); ?
It works for me.
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Arild Jensen wrote:
I am trying to get the mtime of a bunch of files and directores. However,
it fails after the first two files/dirs. I don't see why it should. I am
an experienced sysadmin and a beginner Perl coder (obviously).
Help.
Source code:
#!/usr/bin/perl -w
use strict;
use
Fred == Fred Sahakian [EMAIL PROTECTED] writes:
Fred Does anyone know of any modules that will display Barcodes? I
Fred know about Barcodemill.com already but Im looking for something
Fred affordable or free. Ive played with the popular barcode.pm, but
Fred that creates an actaully EPS or PNG
I'm trying to write a Makefile.pl to distribute module. By just playing
around, I believe I've kind of got the hang of how to make sure my
module gets put in the right place.
However, I have several files that need aren't modules but are needed
for my script. One of these is a data file. How do I
Cupie doll for Mr. Pinyan... thanks!
Both 'length' and (/^\w+$/) indicate an unprintable character in $_.Now
to find out what it is and where it's coming from. (*argh*)
Thanks!
- Original Message -
From: Jeff 'japhy' Pinyan [EMAIL PROTECTED]
To: Karl Kaufman [EMAIL PROTECTED]
Cc:
Hi Gurus!
I'm running Perl 5.004_04 on Win2k.
The system() command in the following script is
failing with a: No such file or directory
error.
@MakeCmd = (nmake, -f, Nmakefile.mak);
$rc = system(@MakeCmd);
print rc = $rc - $!\n;
I can change it from an array to a scalar and it
will work but
On Feb 4, meriwether lewis said:
The system() command in the following script is
failing with a: No such file or directory
error.
What makes you think the system() call is failing? $! only holds a usable
value if something goes wrong. Is $rc equal to 0 or not? Only if $rc is
non-zero will $!
I'm taking a beginning Perl class, and we haven't gotten to pattern matching
yet. I need to somehow test for user input being numeric. I think. :-)
The second elsif is where I'm hung up. It seems to catch any kind of invalid
input, text or numeric. Also, without the first elsif statement,
try with :
system(@MakeCmd);
KM
On Wed, 5 Feb 2003, Jeff 'japhy' Pinyan wrote:
On Feb 4, meriwether lewis said:
The system() command in the following script is
failing with a: No such file or directory
error.
What makes you think the
99 matches
Mail list logo