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 yo

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 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

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 wil

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

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: 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 File::

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: 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 like

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

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 argume

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{$_}:

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 File::stat;

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 direc

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 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, ho

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 lit

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

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 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 data is ret

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 addition

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 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: [EMAI

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/ what does y/// stand for? why, yansliterate of course. [ I'm lookin

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]

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 to

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 wh

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

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: 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 P

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 the

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: 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 and

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

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: 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} )/) --

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

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 mon

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 robus

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 th

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 w

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

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 su

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 ca

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: 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" Pinya

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 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 = (localti

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: 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

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: extracting

2003-02-04 Thread Bob Showalter
mario kulka wrote: > 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)? Properly speaking, that's not an extension, but rather a "subtype". RFC 2045 gives you all the gory details on extactly how Content-typ

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 the

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. audio

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 c

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;' > >

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 my

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 P

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

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

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 <> opera

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, >

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

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: 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: 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: music Thanks for all your help. M From: [EMAIL PROTECTED] To: "mario kulka" <[EMAIL PROTECTED]> CC:

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 apprec

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 () { >if (/^#/) { > # start new array element > push @array, $_; >} >else { > # append to last array element > $array[$#array] .= $_; Or simpler $array[-1]

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 do

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'); > $inf

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! Fre

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 Hyannis

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

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, e-mai

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 unsu

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 p

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: [E

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

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.

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,

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 "\n"; print "\n"; print "Perl Test Page\n"; print "\n"; print "\n"; print "Perl Test Page\n"; print "\n"; print "\n"; My problem is that when I try to run it from a browser I get a 500 web error m

Re: My simple script won't run on my web server

2003-02-04 Thread Gary Stainburn
On Tuesday 04 Feb 2003 6:43 am, Samuel Mauntz wrote: > Here's the code... > > #!/usr/bin/perl > > >print "\n"; >print "\n"; >print "Perl Test Page\n"; >print "\n"; >print "\n"; > print "Perl Test Page\n"; > print "\n"; > print "\n"; > > > when I run it from the command line, it

Re: Regex & threads

2003-02-04 Thread Rob Dixon
Dan wrote: > Hey, I posted a while ago on a thread marked "More regex reguired!", > the solution gave there did part of the job I asked. I need something > more out of that regex though.. > > 1) this.is.a.string.to.match.with > 2) this.is.another.string.to.match.with > 3) this.is.a.totally.with.dif

My simple script won't run on my web server

2003-02-04 Thread Samuel Mauntz
Here's the code... #!/usr/bin/perl print "\n"; print "\n"; print "Perl Test Page\n"; print "\n"; print "\n"; print "Perl Test Page\n"; print "\n"; print "\n"; when I run it from the command line, it runs fine and prints out the results, but I get a 500 error every time I try to

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]

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 "\n"; print "\n"; print "Perl Test Page\n"; print "\n"; print "\n"; print "Perl Test Page\

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]

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]: