Search for a string

2003-02-04 Thread Jeremy Schwartz
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

Re: Search for a string

2003-02-04 Thread Jeremy Schwartz
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

Re: Search for a string

2003-02-04 Thread Jeremy Schwartz
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

Re: Search for a string

2003-02-04 Thread Ken Williams
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

Re: Search for a string

2003-02-04 Thread Dennis Stout
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

Online Resources

2003-02-04 Thread Anthoni
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]

Re: Search for a string

2003-02-04 Thread wiggins
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

Re: Online Resources

2003-02-04 Thread frbn
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

Re: Search for a string

2003-02-04 Thread Jeremy Schwartz
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

Cookie INfo

2003-02-04 Thread Kipp, James
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

RE: Cookie INfo

2003-02-04 Thread wiggins
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

Printing arrays without empty variables

2003-02-04 Thread Jan Cohen
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'} ;

Re: Printing arrays without empty variables

2003-02-04 Thread Dennis Stout
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:

Re: Printing arrays without empty variables

2003-02-04 Thread Jan Cohen
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

Re: Printing arrays without empty variables

2003-02-04 Thread Jan Cohen
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

Re: Printing arrays without empty variables

2003-02-04 Thread Wiggins d'Anconia
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

HTTP request error 500

2003-02-04 Thread Shahar Evron
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

Re: extracting field and getting sum

2003-02-04 Thread Rob Dixon
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

Thread enabled?

2003-02-04 Thread Angerstein
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]

web server 500 error

2003-02-04 Thread Sam Mauntz
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;

My simple script won't run on my web server

2003-02-04 Thread Samuel Mauntz
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

Re: web server 500 error

2003-02-04 Thread George M Gunderson
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

Re: Thread enabled?

2003-02-04 Thread zentara
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

Re: Online Resources

2003-02-04 Thread zentara
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

RE: Sorting Hash of arrays by how many elements

2003-02-04 Thread Paul Kraus
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

sorting hash numerically

2003-02-04 Thread Rob
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:

Re: extracting field and getting sum

2003-02-04 Thread John W. Krahn
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

Re: sorting hash numerically

2003-02-04 Thread Pete Emerson
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

help please

2003-02-04 Thread Benjamin Jeeves
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,

DB_file tutorial and rating script

2003-02-04 Thread Ramón Chávez
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

RE: DB_file tutorial and rating script

2003-02-04 Thread Le Blanc, Kerry (Kerry)
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

Barcodes

2003-02-04 Thread Fred Sahakian
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!

Re: file's MIME type

2003-02-04 Thread Janek Schleicher
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 =

Re: Search Replace

2003-02-04 Thread Janek Schleicher
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

Re: Just another regex quetion

2003-02-04 Thread Janek Schleicher
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] .=

parsing a datafile.

2003-02-04 Thread Christopher M Burger
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

Re: file's MIME type

2003-02-04 Thread mario kulka
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

RE: parsing a datafile.

2003-02-04 Thread Timothy Johnson
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

Re: parsing a datafile.

2003-02-04 Thread Frank Wiles
.--[ 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

Re: file's MIME type

2003-02-04 Thread mario kulka
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:

RE: parsing a datafile.

2003-02-04 Thread Bob Showalter
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

RE: parsing a datafile.

2003-02-04 Thread Jeff 'japhy' Pinyan
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

Re: parsing a datafile.

2003-02-04 Thread Rob Dixon
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

RE: DB_file tutorial and rating script

2003-02-04 Thread Ramón Chávez
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

Subscript question

2003-02-04 Thread Zysman, Roiy
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

RE: DB_file tutorial and rating script

2003-02-04 Thread wiggins
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

RE: Subscript question

2003-02-04 Thread wiggins
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

RE: DB_file tutorial and rating script

2003-02-04 Thread Le Blanc, Kerry (Kerry)
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

extracting

2003-02-04 Thread mario kulka
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.

Re: Regex threads

2003-02-04 Thread dan
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

RE: extracting

2003-02-04 Thread mario kulka
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

Re: Subscript question

2003-02-04 Thread Rob Dixon
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

RE: Subscript question

2003-02-04 Thread Jenda Krynicky
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];

Re: parsing a datafile.

2003-02-04 Thread Jeff 'japhy' Pinyan
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;

Re: Subscript question

2003-02-04 Thread Jeff 'japhy' Pinyan
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

matching patterns

2003-02-04 Thread mario kulka
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

RE: matching patterns

2003-02-04 Thread Mark Anderson
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

RE: matching patterns

2003-02-04 Thread Bob Showalter
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

perl4 vs. perl5

2003-02-04 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
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

Re: perl4 vs. perl5

2003-02-04 Thread Paul Johnson
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

CHeck for valid numbers

2003-02-04 Thread Ned Cunningham
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

Re: perl4 vs. perl5

2003-02-04 Thread Jenda Krynicky
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.

Re: perl4 vs. perl5

2003-02-04 Thread Brent Michalski
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

RE: CHeck for valid numbers

2003-02-04 Thread wiggins
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

RE: CHeck for valid numbers

2003-02-04 Thread Kipp, James
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

RE: CHeck for valid numbers

2003-02-04 Thread Kipp, James
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]

Re: extracting field and getting sum

2003-02-04 Thread Eri Mendz
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

RE: perl4 vs. perl5

2003-02-04 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
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

Timing an execution of an command

2003-02-04 Thread Distribution Lists
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

Re: Barcodes

2003-02-04 Thread Rob
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

Re: Timing an execution of an command

2003-02-04 Thread Jenda Krynicky
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

How do I include a bmp or gif file in my TK code

2003-02-04 Thread msheffie
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:

Re: extracting field and getting sum

2003-02-04 Thread John W. Krahn
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

RE: DB_file tutorial and rating script

2003-02-04 Thread Ramón Chávez
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

Mail::Sender ads .dat extension

2003-02-04 Thread Dan Muey
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

including subroutines from other files ...

2003-02-04 Thread Jamie Risk
How does one do this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: including subroutines from other files ...

2003-02-04 Thread Jeff 'japhy' Pinyan
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. [

RE: including subroutines from other files ...

2003-02-04 Thread Hanson, Rob
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:

RE: including subroutines from other files ...

2003-02-04 Thread Scott, Joshua
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 ...

Re: including subroutines from other files ...

2003-02-04 Thread Wiggins d'Anconia
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

NET::Telnet send cmd without response

2003-02-04 Thread David O'Dell
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

Trouble with referencing hash entry

2003-02-04 Thread Karl Kaufman
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

Re: Trouble with referencing hash entry

2003-02-04 Thread Wiggins d'Anconia
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

Re: NET::Telnet send cmd without response

2003-02-04 Thread Wiggins d'Anconia
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

move data into separate directory

2003-02-04 Thread Jose Malacara
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

lstat($_)-mtime fails

2003-02-04 Thread Arild Jensen
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

Re: Trouble with referencing hash entry

2003-02-04 Thread Jeff 'japhy' Pinyan
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' .

Re: Subscript question

2003-02-04 Thread R. Joseph Newton
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

Re: Subscript question

2003-02-04 Thread Jeff 'japhy' Pinyan
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

Re: move data into separate directory

2003-02-04 Thread Wiggins d'Anconia
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

Re: move data into separate directory

2003-02-04 Thread R. Joseph Newton
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]

Re: lstat($_)-mtime fails

2003-02-04 Thread Wiggins d'Anconia
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

Re: Barcodes

2003-02-04 Thread Randal L. Schwartz
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

how to set up Makefile.pl

2003-02-04 Thread Paul Tremblay
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

Re: Trouble with referencing hash entry

2003-02-04 Thread Karl Kaufman
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:

system() call fails

2003-02-04 Thread meriwether lewis
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

Re: system() call fails

2003-02-04 Thread Jeff 'japhy' Pinyan
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 $!

how to test for numeric user input?

2003-02-04 Thread Gary Merrick
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,

Re: system() call fails

2003-02-04 Thread km
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