Re: win32 mail

2002-05-20 Thread Arran4
isnt there are windows send mail client? From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an executable is to embed the perl interpreter! song: "If you are sexy and you kno

"If it ain't smoking...." was Re: File exists

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 10:40 , Jeff 'japhy' Pinyan wrote: > On May 21, Arran4 said: > >> so i could do?: >> >> if (-e "c:\config.sys") { > > Why don't you test it yourself, instead of asking us for permission? You > can learn a lot about Perl by trying things yourself. I'd like to undersco

while<> was Re: avoid backticking if at all possible - Re: perl awk question

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 10:43 , Peter Scott wrote: [..] > At 10:25 PM 5/20/02 -0700, drieux wrote: [..] >>> print while <>; >> >> I thought that was a synonym for STDIN? > > Only in certain cases. It iterates over @ARGV; it's special. Look under > "I/O Operators" in perlop. "Well

Re: avoid backticking if at all possible - Re: perl awk question

2002-05-20 Thread Peter Scott
At 10:25 PM 5/20/02 -0700, drieux wrote: >On Monday, May 20, 2002, at 05:48 , Peter Scott wrote: >>At 02:52 PM 5/20/02 -0700, drieux wrote: >[..] >>> open(FH, "$file"); # normally we want to die >>> print $_ while(); # silly but a one liner >[..] >>I missed the e

Re: File exists

2002-05-20 Thread Jeff 'japhy' Pinyan
On May 21, Arran4 said: >so i could do?: > >if (-e "c:\config.sys") { Why don't you test it yourself, instead of asking us for permission? You can learn a lot about Perl by trying things yourself. And no, you can't. In a double-quoted string, "\co" means Ctrl-O, and I doubt you wanted that.

Re: File exists

2002-05-20 Thread Arran4
so i could do?: #!c:\perl\bin\perl.exe uses *** if (-e "c:\config.sys") { From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an executable is to embed the perl in

Re: avoid backticking if at all possible - Re: perl awk question

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 05:48 , Peter Scott wrote: > At 02:52 PM 5/20/02 -0700, drieux wrote: [..] >> open(FH, "$file"); # normally we want to die >> print $_ while(); # silly but a one liner >> [..] > I missed the earlier articles in the thread so may be off

Re: stdout and error to one file

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 08:54 , [EMAIL PROTECTED] wrote: > Hi, > > I try to write a script that redirects its output, both out and error, to > a log-file, if it's possible to the screen as well. > > At the moment I'm doing this with > > open (FILE, ">whatever.txt"); > > open (STDOUT, ">&FILE

stdout and error to one file

2002-05-20 Thread Christian . Niebuhr
Hi, I try to write a script that redirects its output, both out and error, to a log-file, if it's possible to the screen as well. At the moment I'm doing this with open (FILE, ">whatever.txt"); open (STDOUT, ">&FILE"); open (SDTERR, ">&FILE"); But now of course I don't have the output on th

RE: Fastest method with a hashes...

2002-05-20 Thread Jeff 'japhy' Pinyan
On May 20, Nikola Janceski said: >This returns an odd number of elements: > >my %BYNAME = map { { "$ALL{$_}" => "$_" } } keys %ALL; You've got an extra set of { } in there. The inner one makes a hash reference, so if the hash has an odd number of keys, there will be an odd number of hash refere

Re: avoid backticking if at all possible - Re: perl awk question

2002-05-20 Thread Peter Scott
At 02:52 PM 5/20/02 -0700, drieux wrote: >What may help the process here is to think 'cat' but in 'perl' > > #!/usr/bin/perl -w > use strict; > > foreach my $file (@ARGV) { # for everything we see on the command > line >

Re: SQL: Insert column?

2002-05-20 Thread bob ackerman
On Sunday, May 19, 2002, at 10:58 PM, [EMAIL PROTECTED] wrote: > Hello, All: > > I'm using DBI.pm to interact with flat-file database and want to add a new > column to the database. Is there an SQL statement for such a task or do I > need to transfer the contents of the file to another file and

Re: Fastest method with a hashes...

2002-05-20 Thread Jonathan E. Paton
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > ... > %byname = reverse %hash; Thanks John, that was the concise way to do it. Time for someone to do the benchmarks between this and the "while each" method I did. I *think* the latter will be faster (or at least less memory hungry) - but perha

SQL: Insert column?

2002-05-20 Thread eric-perl
Hello, All: I'm using DBI.pm to interact with flat-file database and want to add a new column to the database. Is there an SQL statement for such a task or do I need to transfer the contents of the file to another file and insert the column during the transfer? -- Eric P. Los Gatos, CA --

RE: Pattern Matching...again...

2002-05-20 Thread Batchelor, Scott
I would just like to thank everyone on this list for all their help...I did figure this out on my own. But all of your help has been great. Thanks. Scott -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 4:49 PM To: 'Batchelor, Sco

avoid backticking if at all possible - Re: perl awk question

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 12:40 , Taylor Lewick wrote: Taylor, as your code indicates you are still thinking in classical shell terms of 'well fork a bunch of sub children and let the kernel resolve the stdin to stdout connections.' which is where most of us start - nothing wrong with it.

RE: Fastest method with a hashes...

2002-05-20 Thread Jonathan E. Paton
> any ideas on how to create reverse hash quick? > ... while (my ($key, $value) = each %hash) { warn "Collision during inversion!" if exists $hash{$value}; $new_hash{$value} = $key; } of course, if you are doing this a lot then you need a different structure. The solution is obv

RE: Pattern Matching...again...

2002-05-20 Thread Hanson, Robert
A few things... If ($var1 =~ /\b$var2?\b/I) { ^^ it should be "if" not "If" If ($var1 =~ /\b$var2?\b/I) { ^ The switch is "i" not "I" Print "cannot contain that word.\n"; ^ the "p" in print is lower case (are you using Win32::ASP?) if ($var1 =~ /\b$var2?\b/i) {

Re: Fastest method with a hashes...

2002-05-20 Thread John W. Krahn
Nikola Janceski wrote: > > That would be my grep method > > $pc = grep $testvalue eq $HASH{$_}, keys %HASH; > > any ideas on how to create reverse hash quick? > This returns an odd number of elements: > > my %BYNAME = map { { "$ALL{$_}" => "$_" } } keys %ALL; $ perl -le' %hash = ( PC1 => "Nik

Pattern Matching...again...

2002-05-20 Thread Batchelor, Scott
I am trying to match a word in a string. I am using to variables here is my small piece of code that should be doing this. If ($var1 =~ /\b$var2?\b/I) { Print "cannot contain that word.\n"; } Only for some reason it isn't working. Any help is greatly appreciated. Scott -- To

Re: perl awk question

2002-05-20 Thread John W. Krahn
Taylor Lewick wrote: > > Hi, > I have the following one liner which works great in a shell script. > I have a comma delimited text file with the same number of rows. > I want to add the date in -MM-DD format to every line... > > I was doing this.. > cat $file | awk '{print $0 "," "'$fdate'"}

RE: Fastest method with a hashes...

2002-05-20 Thread Nikola Janceski
found it... some damn values were empty. > -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 20, 2002 5:17 PM > To: 'Timothy Johnson'; Nikola Janceski; Beginners (E-mail) > Subject: RE: Fastest method with a hashes... > > > That would be my grep m

RE: Fastest method with a hashes...

2002-05-20 Thread Nikola Janceski
That would be my grep method $pc = grep $testvalue eq $HASH{$_}, keys %HASH; any ideas on how to create reverse hash quick? This returns an odd number of elements: my %BYNAME = map { { "$ALL{$_}" => "$_" } } keys %ALL; > -Original Message- > From: Timothy Johnson [mailto:[EMAIL PROTECT

Re: DBI mySQL and Sybase confusion

2002-05-20 Thread bernabe diaz
You need to download DBB module client for sybase or mysql. download the instruction , go to cspan and download fromthere good luck BD JASON CANNEY wrote: >I admit my newness first off. I am trying to connect to two databases. One is local >which is a mySQL database, and the other is a remo

RE: Fastest method with a hashes...

2002-05-20 Thread Timothy Johnson
The only other thing I can think of that you haven't mentioned is just cycling through the keys 'till you get one that matches, which is probably not the fastest approach, but if memory is a huge issue, it's probably one of the most efficient. foreach(keys %hash){ if($hash{$_} = $myvalue){

Re: perl awk question

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 01:07 , Ovid wrote: >> I want to add the date in -MM-DD format to every line... >> >> I was doing this.. >> cat $file | awk '{print $0 "," "'$fdate'"}' >>$new_file >> >> Works great [..] too many letters to type [..] > If you're trying to do this in a one-liner

Fastest method with a hashes...

2002-05-20 Thread Nikola Janceski
I have a hash as follows: PC1 => Nikola Janceski PC2 => Some Moron PC3 => Some Other Moron etc.. I want to be able to get the key (PC#) using the value, what's the fastest method? What I can think of: a. have a reversed hash of the same info. b. use that funky module which makes hashes go both

RE: Calling subroutines...

2002-05-20 Thread Arul, Rex
When you say, Calling_Sub($var1, $var2), Perl automatically fills in the @_ array with the list of elements you are passing. Now subsequently, inside your subroutine, when you say: my $subvar = @_; what you are doing is that you are getting the scalar value of the array. Since you are passing

Calling subroutines...

2002-05-20 Thread Batchelor, Scott
Hi again all. I have a question about calling a subroutine in Perl. Here is what I am trying: Calling_sub($var1, $var2); sub calling_sub my $subvar = @_; my $subvar1 = $var1 my $subvar2 = $var2 Now my question is...Don't I need to somehow split the two variables that I passed to the subr

using Graph

2002-05-20 Thread Johnson, Shaunn
Howdy: I think I need a second pair of eyes. I think I'm close with creating a trending line graph, but I can't figure out what part goes where and why I can not see anything useful. My goal: I am trying to connect to the database and pull back 6 fields (5 regions and 1 timestamp) and chart t

DBI mySQL and Sybase confusion

2002-05-20 Thread JASON CANNEY
I admit my newness first off. I am trying to connect to two databases. One is local which is a mySQL database, and the other is a remote (same subnet) Sybase database. Does anyone have an idiot's guide - version of how I install the Sybase and mySql drivers as the solution to the error messa

RE: Calling subroutines...

2002-05-20 Thread Hanson, Robert
There are lots of ways to do this, but this is an easy one to understand... Calling_sub($var1, $var2); sub Calling_sub { my ($subvar1, $subvar2) = @_; print $subvar1; print $subvar2; } Explaination - When you call a sub the parameters are passed via a special array named @_. Perl puts

RE: Calling subroutines...

2002-05-20 Thread Bob Showalter
> -Original Message- > From: Batchelor, Scott [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 20, 2002 4:21 PM > To: '[EMAIL PROTECTED]' > Subject: Calling subroutines... > > > Hi again all. > > I have a question about calling a subroutine in Perl. Here > is what I am > trying: > > Ca

Re: perl awk question

2002-05-20 Thread Ovid
--- Taylor Lewick <[EMAIL PROTECTED]> wrote: > Hi, I have the following one liner which works great in a shell script. I have a >comma > delimited text file with the same number of rows. > I want to add the date in -MM-DD format to every line... > > I was doing this.. > cat $file | awk

perl awk question

2002-05-20 Thread Taylor Lewick
Hi, I have the following one liner which works great in a shell script. I have a comma delimited text file with the same number of rows. I want to add the date in -MM-DD format to every line... I was doing this.. cat $file | awk '{print $0 "," "'$fdate'"}' >>$new_file Works great Unfo

Re: Perl Server Pages (PSP)

2002-05-20 Thread Michael Norris
I, of course, did the same google search. But my confusion came in when I looked at http://www.playsport.com/psp_home/home.html This is a quote from that first page: "Note: After I've written my Perl Server Pages engine, I discovered that there is an open source project also called Perl Server

RE: help!

2002-05-20 Thread Beau E. Cox
Yeah, I think we've beat this one to death :-) Aloha => Beau. -Original Message- From: Jackson, Harry [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 7:06 AM To: '[EMAIL PROTECTED]' Subject: RE: help! What happened to these numbers was my point. Your method removes numbers from t

RE: help!

2002-05-20 Thread Jackson, Harry
What happened to these numbers was my point. Your method removes numbers from the array which I was taking as not good form. I think its interpretation of the question. > 1 > 2 > 3 > 12 > 13 > 14 > 16 > 17 > 18 1 2 3 > 19 > 20 > 21 > 22 Harry. *

Re: Regex, search until second digit

2002-05-20 Thread Bryan R Harris
How about this? /([A-Za-z\-]+\d\d)/; print "$1\n"; - B __ Hello all, I have a var, $DOC_NAME, holding a file name. I need to get the first part of the variable into another variable. Some examples are A98-12345, SO-02-789, P-99-029833 and GQE-37-2199. Examples: A98-12345,

RE: help!

2002-05-20 Thread Beau E. Cox
Harry - What do you mean it won'r work? I ran the following: use strict; my @list = (1,2,3,12,13,14,16,17,18,1,2,3,19,20,21,22); my %conseq; $conseq{$_} = $_ for (@list); for (keys %conseq) {delete $conseq{$_} unless $conseq{$_-1} or $conseq{$_+1}} my @conseq; push @conseq, $_ for (sort {$a <=>

Re: Perl Server Pages (PSP)

2002-05-20 Thread José Nyimi
http://www.google.be/search?q=psp+perl+server+page&hl=fr&ie=UTF8&oe=UTF8 José. Michael Norris <[EMAIL PROTECTED]> a écrit : Hello, I've recently come across web pages with the .psp extensions rather than the usual /cig-bin/. I have found that .psp stands for Perl Server Pages, but I have n

Re: Help for Mboxparser Module

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 03:53 , Ankit Gupta wrote: > I am working using Mboxparser module for parsing mails. But I am not able > to get all the header information. I mean to say that I need header like > below: based solely on reading the documents http://search.cpan.org/doc/VPARSEVAL/Mail-

RE: help!

2002-05-20 Thread Jackson, Harry
> -Original Message- > From: Paul Johnson [mailto:[EMAIL PROTECTED]] > > @sorted = sort { $a <=> $b } @unsorted;# numeric sort I like that. I have just had a look at perlop to see what <=> does. They have used a subroutine called backwards with an array called harry. Is someone tr

Re: Open a file to a Hash

2002-05-20 Thread drieux
On Sunday, May 19, 2002, at 07:31 , Jolinar of Malkshur wrote: > I wasn't asking for anyone to do my homework. I was just looking > for -suggestions- on how to do it a specific part that I got hung up on. > You know, pointers in the right direction? > > Jolinar >> what you are looking for is e

Re: help!

2002-05-20 Thread Paul Johnson
On Mon, May 20, 2002 at 04:04:34PM +0100, Jackson, Harry wrote: > > > > -Original Message- > > From: drieux [mailto:[EMAIL PROTECTED]] > > > > also - if you read 'man sort' you will find that sort -n > > understands how to do numeric sorting > > Being pedantic sort in perl is diffe

Fun with Hashes - was -Re: extracting array info from text file

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 03:34 , [EMAIL PROTECTED] wrote: > Not used hashes before - stuck to simple arrays.. (unix shell scripting > background) the good news is that perl has 'associative arrays' of the form my %hash; $hash{$key} = $val; the bad news is th

RE: Perl Server Pages (PSP)

2002-05-20 Thread Shah, Urmil
Hope this helps. http://psp.sourceforge.net/ home page for PSP http://www.ddj.com/documents/s=861/ddj0108g/0108g.htm description about PSP Urmil -Original Message- From: Michael Norris [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 9:58 AM To: [EMAIL PROTECTED] Subject: Perl Serve

RE: help!

2002-05-20 Thread Jackson, Harry
> -Original Message- > From: drieux [mailto:[EMAIL PROTECTED]] > > also - if you read 'man sort' you will find that sort -n > understands how to do numeric sorting Being pedantic sort in perl is different than sort in *nix. I am sure we are not able to use -n in perls version, or c

Re: Hourly Rates

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 07:26 , Elaine -HFB- Ashton wrote: [..] > http://lists.cpan.org/showlist.cgi?name=perl-cert > > e. two questions come to mind: a) How do you do that? b) and once a perler is certified, do the folks from the looney bin put them away qu

RE: help!

2002-05-20 Thread Bob Showalter
> -Original Message- > From: Haitham N Traboulsi [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 17, 2002 10:09 PM > To: [EMAIL PROTECTED] > Subject: help! > > > Hi, > I am working on a chunk of PERL software that can find out > the groups of consecutive numbers located within a list. Fo

Perl Server Pages (PSP)

2002-05-20 Thread Michael Norris
Hello, I've recently come across web pages with the .psp extensions rather than the usual /cig-bin/. I have found that .psp stands for Perl Server Pages, but I have not been able to find a decent tutorial on how they work. Does anyone know of a good site. Thanks! _

Re: help!

2002-05-20 Thread drieux
On Monday, May 20, 2002, at 01:48 , Jackson, Harry wrote: >> -Original Message- >> From: Beau E. Cox [mailto:[EMAIL PROTECTED]] >> I ignored uniqueness because non-unique numbers are NOT consecutive. >> My solution works on non-sorted input arrays. > > To be a picky twat. > > my @array =

Re: Makefile.pl, now what?

2002-05-20 Thread Eric Beaudoin
At 21:45 2002.05.19, Tim Musson wrote: >Hey Eric, > >My MUA believes you used QUALCOMM Windows Eudora Version 5.1 >to write the following on Sunday, May 19, 2002 at 9:09:31 PM. > >EB> To install CPAN modules on a W32 PC, you need to get a copy of >EB> nmake

RE: A simple question

2002-05-20 Thread Shishir K. Singh
or perhaps $receivedmail = $1 if $data =~ / (\d+) /; This assumes that 16764 will be the the first occurance of the digits. If you don't want column dependency, this will help -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 10:29 AM To:

RE: A simple question

2002-05-20 Thread Bob Showalter
> -Original Message- > From: Stuart Clark [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 17, 2002 11:08 PM > To: 'Perl List' > Subject: A simple question > > > Hi All > Is there an easier way of picking out the number 16764 in this line > rather that using an array, split then $number[3]

Re: Hourly Rates

2002-05-20 Thread Elaine -HFB- Ashton
Jackson, Harry [[EMAIL PROTECTED]] quoth: *> *>I wasn't serious I was being sarcastic. About making a living? Lucky you :) Sun has several courses on perl where they give you a little certificate of completion when you finish the course. Also, there are a bunch of people in the London.pm who ar

Re: FIle upload

2002-05-20 Thread Chris Ball
> "arran" == arran ubels writes: arran> I cant get a sucessfull file upload in ActivePerl i have arran> tried many ways,,, can someone send me a sucessfull example? First up, I really hate your sig. ;-) Second, use CGI::Upload from the CPAN. It has example uses in its own documen

Re: Looping through variables

2002-05-20 Thread Jaime Hourihane
assign it to an array and then loop thru it @array = qw(name age phone); foreach (@array) { print "$_\n"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DDE in Perl

2002-05-20 Thread Jonathan E. Paton
--- Arran <[EMAIL PROTECTED]> wrote: > Does perl support DDE by any chance (eg communcation with MSword ect) > > Dont bother telling me if im going to have to use API I'd better not bother telling you... every interaction with another application requires an Application Programming Interface (A

Re: Library ref man

2002-05-20 Thread Arran4
www.fineprint.com <--- use that to print the webpages to pdf format... From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an executable is to embed the perl interpreter! song

Re: stop the Madness

2002-05-20 Thread Arran4
heh thats has already been added to my ever growing signuture hehehe (should shorten it sometimes) From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an executable is to embed

DDE in Perl

2002-05-20 Thread Arran
Does perl support DDE by any chance (eg communcation with MSword ect) dont bother telling me if im going to have to use api From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into

RE: FIle upload

2002-05-20 Thread John Edwards
agrh. sig from hell... Post some example code. What platform are you running on? What webserver? Have you got any error messages? How about the server logs? Is there anything relevant there? Are you using the cgi.pm module? John -Original Message- From: Arran [mailto:[EMAIL PROTECTE

Re: Same help 2

2002-05-20 Thread Arran4
Your probly looking for a more introduction to programming book From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an executable is to embed the perl interpreter! song: "

Re: Books

2002-05-20 Thread Arran4
I actually learnt perl off this list, just by looking at the examples i know im no where near good but i can eventualy make what i want lol :) From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to tur

FIle upload

2002-05-20 Thread Arran
I cant get a sucessfull file upload in ActivePerl i have tried many ways,,, can someone send me a sucessfull example? From: Arran === It is obvious: The only program that parses Perl is perl, and to really be Perl you also have to be perl. The easiest way to turn Perl code into an ex

Re: Open a file to a Hash

2002-05-20 Thread José Nyimi
perldoc -f tie Or Why not use hash of array structure: open(FH,$filename) || die "error message\n"; @file_content=; close(FH); $hash{FILE}=\@file_content; ### After you can use your hash like this : $myfile_arrayref=$hash{FILE}; foreach $line ( @{$myfile_arrayref} ){ #bla bla #print "$line\n"; }

Help for Mboxparser Module

2002-05-20 Thread Ankit Gupta
Hello, I am working using Mboxparser module for parsing mails. But I am not able to get all the header information. I mean to say that I need header like below: >From [EMAIL PROTECTED] Mon, 20 May 2002 02:34:35 -0700 Received: from [202.54.124.152] by hotmail.com (3.2) with ESMTP id MHotMailBEB

RE: Hourly Rates

2002-05-20 Thread Jackson, Harry
> -Original Message- > From: Timothy Johnson [mailto:[EMAIL PROTECTED]] > > So my advice is, if anyone here wants to get paid for this > stuff, go out and > post an ad in the classifieds for a Perl tutor. But I > promise you it won't > be half as fun. I wasn't serious I was being s

RE: Hourly Rates

2002-05-20 Thread Timothy Johnson
"Does anyone think that for certain types of questions an hourly rate would be justified. In the UK Perl Contractors can earn some silly money. What would be a reasonable hourly rate in other countries." I'll take anything you want to send me, but I don't think that anyone deserves to be paid for

Re: extracting array info from text file

2002-05-20 Thread Steven_Massey
Excellent !!! Not used hashes before - stuck to simple arrays.. (unix shell scripting background) idea of using time as hash key is great - but I'm going to need me to sit down and get my head around it. Thanks Sudarsan Raghavan <[EMAIL PROTECTED]>@india.hp.com on 05/20/2002 11:24:13 AM

Re: return

2002-05-20 Thread Jonathan E. Paton
> > Would something like this work? Is there a way to get it working? > > > > print (&test); Caution: print (1 + 2) * 3 != print +(1 + 2) * 3 because of the rules of precedence. As per Paul's reply... what exactly is the question? Jonathan Paton ___

Re: extracting array info from text file

2002-05-20 Thread Sudarsan Raghavan
[EMAIL PROTECTED] wrote: > Hi All > > I have a textfile comprised of x number races each with x number of runners > eg. > > 13:00 > runner1 > runner2 > runner3 > runner4 > > 14:00 > runner1 > runner2 > runner3 > > 15:00 > runner1 > runner2 > > I want to put each race time into seperate array and

RE: Regex, search until second digit

2002-05-20 Thread Jonathan E. Paton
> Clearly, in the real usage you'll capture and not use $&. Just in case that's not clear to beginners... one use of either $&, $' or $` will flush regex performance down the pan for your whole program. See page 146 of Programming Perl (3rd Ed, "Camel"). Best to avoid in anything but trival pro

Re: return

2002-05-20 Thread Paul Johnson
On Mon, May 20, 2002 at 06:06:13AM -, Langa Kentane wrote: > Would something like this work? Is there a way to get it working? > > print (&test); > > sub test > { > return "This is a test"; > } > > I have tried this and this specific code does not work. Really? Seems to work fine f

RE: Regex, search until second digit

2002-05-20 Thread Richard_Cox
On 18 May 2002 04:21, John W. Krahn [mailto:[EMAIL PROTECTED]] wrote: > Bill Akins wrote: > > > > Hello all, > > Hello, > > > I have a var, $DOC_NAME, holding a file name. I need to > get the first > > part of the variable into another variable. Some examples are > > A98-12345, SO-02-789, P-

RE: Effective Perl Programming

2002-05-20 Thread Jackson, Harry
I noticed that the london pm website was down so got the from Dean. Please see review below. H Elements of Programming With Perl Andrew L Johnson If you come from a non-programming background and you want to learn Perl go and buy this book. Now. The rest of the review will wait until you get ba

return

2002-05-20 Thread Langa Kentane
Would something like this work? Is there a way to get it working? print (&test); sub test { return "This is a test"; } I have tried this and this specific code does not work. I am sure you get the idea of what I am trying to do, how can I do it, is it recommended? Regards LK -- To

Re: Open a file to a Hash

2002-05-20 Thread Jolinar of Malkshur
I wasn't asking for anyone to do my homework. I was just looking for -suggestions- on how to do it a specific part that I got hung up on. You know, pointers in the right direction? Jolinar "Drieux" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Sunday,

Re: Hourly Rates

2002-05-20 Thread Paul Johnson
On Mon, May 20, 2002 at 10:13:53AM +0100, Jackson, Harry wrote: > Does anyone think that for certain types of questions an hourly rate would > be justified. In the UK Perl Contractors can earn some silly money. What > would be a reasonable hourly rate in other countries. http://perl.plover.com/Q

Re: print $LOG "This is a test";

2002-05-20 Thread José Nyimi
The reasons: -I'm writing a class and try to respect as much as possible OOP concept. -So I would like to use a logfile handle as "class attribute" ( not an object attribute) that will be used by a debugger methode of my class. -I wrote something like: #!/usr/bin/perl -w package A; use strict;

RE: extracting array info from text file

2002-05-20 Thread Steven_Massey
Hi Not with me, it is a "home" project. I have been succsessful in using nested for loops and greping the info out into text file. But I need to now reference the data, and am having a problem picking up the different arrays. I am not after a written solution ( I enjoy the doing) but more g

Hourly Rates

2002-05-20 Thread Jackson, Harry
Does anyone think that for certain types of questions an hourly rate would be justified. In the UK Perl Contractors can earn some silly money. What would be a reasonable hourly rate in other countries. Does anyone know of a widely recognised Perl certification programme other than RTFM for n year

extracting array info from text file

2002-05-20 Thread Steven_Massey
Hi All I have a textfile comprised of x number races each with x number of runners eg. 13:00 runner1 runner2 runner3 runner4 14:00 runner1 runner2 runner3 15:00 runner1 runner2 I want to put each race time into seperate array and each runner to be a subset of particular array, the amount of

RE: help!

2002-05-20 Thread Jackson, Harry
> -Original Message- > From: Beau E. Cox [mailto:[EMAIL PROTECTED]] > > > Ok, but, but... > > I ignored uniqueness because non-unique numbers are NOT consecutive. > My solution works on non-sorted input arrays. To be a picky twat. my @array = (1,2,3,12,13,14,16,17,18,1,2,3,19,20,21

Re: printing html

2002-05-20 Thread Gary Stainburn
On Saturday 18 May 2002 2:01 pm, Mat Harris wrote: > I know all about printing html to a browser from a CGI script, but is it > possible to put PHP in that html? If so, how? There is nothing to stop you printing the PHP stuff out from your perl script, but to the best of my knowledge there is no

Re: my & local variables

2002-05-20 Thread Sudarsan Raghavan
> > > #!/usr/bin/perl -w > use strict; > > my $var=1; > > sub thisSub { > local( $var ); > This will give this error "Can't localize lexical variable ..." A working example #!/usr/bin/perl -w use strict; $main::var=1; sub print_var { print "packa

RE: Writing to the Windows registry

2002-05-20 Thread Timothy Johnson
Well, since you called me on it, I might as well step up to the plate and give it a shot. The $HKEY_CURRENT_USER variable might be defined by the module you're using. I can't tell what module that is, since you conveniently chopped off the top of your script. If you didn't leave anything out,