Re: Hey, I mapped something without training wheels

2003-06-06 Thread Katy Brownfield
On Fri, 6 Jun 2003 21:22:13 +0100, Rob Dixon <[EMAIL PROTECTED]> wrote: Katy Brownfield wrote: On Fri, 6 Jun 2003 18:16:26 +0100, Rob Dixon <[EMAIL PROTECTED]> wrote: > John W. Krahn wrote: > > Mark Anderson wrote: > > > > > > B) You should NEVER use map in a void context. map works very hard >

Segfault in MIME::Fast

2003-06-06 Thread Ramprasad
Hello all, I was running a small test script with MIME::Fast and it simply segfaults. Can anyone tell me why ## BEGIN SCRIPT ### #!/usr/bin/perl use MIME::Fast; my $str = new MIME::Fast::Stream(\*DATA); my $msg = MIME::Fast::Parser::construct_message($st

Re: Illegal seek

2003-06-06 Thread R. Joseph Newton
"Gupta, Sharad" wrote: > While running this: > > my $new = "/newtests/new "; > $new .= "\'$fields{public}\' \'$fields{sev}\' \'$fields{pri}\' "; > $new .= "\'$fields{cc}\' \'$fields{bug_rel}\' \'$fields{type}\' "; > $new .= "\'$fields{title}\' \'

Re: perl extensions

2003-06-06 Thread R. Joseph Newton
Francis Henry wrote: > Hi: > > The following is a note from a colleague of which I am skeptical: > > "fyi > .pl used to be used for both executables and libraries. > A library is simply perl code located in a different file which is > imported into another perl program with the 're

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
Rob Dixon wrote: > James Edward Gray II wrote: > > On Friday, June 6, 2003, at 03:32 AM, R. Joseph Newton wrote: > > > > > The player's name IS the number. No other numbering system is > > > needed. The players name is NEVER stored in the hash, AFAIK. The > > > name is used to feed a hashing f

Re: Hey, I mapped something without training wheels

2003-06-06 Thread R. Joseph Newton
"John W. Krahn" wrote: > ... just like there are some situations where goto is > appropriate. > > :-) > > John Careful John, They don't make stake rope and kindling for nothing. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: lesson on multi-dimensional hashes?

2003-06-06 Thread R. Joseph Newton
Stuart White wrote: > I've a problem that I think is best solved with > multi-dimensional hashes. However, the reference that > I'm using doesn't really cover them. Does anyone know > where I might find some tutorial article of some sort > with an example or two on multi-dimensional hashes? > >

Re: Warnings/strict still needed?

2003-06-06 Thread R. Joseph Newton
Rob Dixon wrote: > It's twenty or thirty years since we had to write programs carefully > so that they would fit in 4KB of RAM and complete before the end of > the day. > OGawd Rob, Don't tell me you were around for that! I do remember my first computer c. 1984, a closeout score of a Timex-Sinc

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
James Edward Gray II wrote: > On Friday, June 6, 2003, at 03:32 AM, R. Joseph Newton wrote: > > > The player's name IS the number. No other numbering system is > > needed. The players name is NEVER stored in the hash, AFAIK. The > > name is used to feed a hashing function, which renders an ind

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
"R. Joseph Newton" wrote: > Stuart White wrote: > > > This does make it clearer, but not entirely. Is this > > what is happening: the loop starts, and goes > > immediately into the if statement. when the regex > > finds a line with "Jump Shot" it stores that in $2, > > and the player name in $1.

Re: processing text in perl script

2003-06-06 Thread John W. Krahn
Pedro Antonio Reche wrote: > > Hi All, Hello, > I would like to read and process line by line (using while) some text > embeded into my perl script. > I tried something like: > > #/usr/sbin/perl > > open(D, "__DATA__"); > while(){ There is nothing that you have to open. If you use the DATA f

Re: processing text in perl script

2003-06-06 Thread Jair Santos
You have to include the go_next; in your while loop. Jair - Original Message - From: "Pedro Antonio Reche" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 06, 2003 3:40 PM Subject: processing text in perl script > Hi All, > > I would like to read and proces

processing text in perl script

2003-06-06 Thread Pedro Antonio Reche
Hi All, I would like to read and process line by line (using while) some text embeded into my perl script. I tried something like: #/usr/sbin/perl open(D, "__DATA__"); while(){ print $_; } close(D); __DATA__ This is a test and nothing else the execution of the prog

RE: Illegal seek

2003-06-06 Thread Gupta, Sharad
While running this: my $new = "/newtests/new "; $new .= "\'$fields{public}\' \'$fields{sev}\' \'$fields{pri}\' "; $new .= "\'$fields{cc}\' \'$fields{bug_rel}\' \'$fields{type}\' "; $new .= "\'$fields{title}\' \'$fields{description}\' \'$fields

Re: arrays and hashes

2003-06-06 Thread Rob Dixon
James Edward Gray II wrote: > On Friday, June 6, 2003, at 03:32 AM, R. Joseph Newton wrote: > > > The player's name IS the number. No other numbering system is > > needed. The players name is NEVER stored in the hash, AFAIK. The > > name is used to feed a hashing function, which renders an inde

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Rob Dixon
Katy Brownfield wrote: > On Fri, 6 Jun 2003 18:16:26 +0100, Rob Dixon <[EMAIL PROTECTED]> > wrote: > > > John W. Krahn wrote: > > > Mark Anderson wrote: > > > > > > > > B) You should NEVER use map in a void context. map works very hard > > > >to build up it's return value, so there should be a

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Katy Brownfield
On Fri, 6 Jun 2003 18:16:26 +0100, Rob Dixon <[EMAIL PROTECTED]> wrote: John W. Krahn wrote: Mark Anderson wrote: > > B) You should NEVER use map in a void context. map works very hard >to build up it's return value, so there should be an assignment >(=) operator to the left of your map

Re: Cant seem to understand

2003-06-06 Thread Steve Grazzini
Rob Dixon <[EMAIL PROTECTED]> wrote: > John W. Krahn wrote: >> >> splice() will only work with array not lists. > > ... but (as you meant to say, John) you can take a slice > of a list like this > > my ($seconds, $minutes, $hours) = (localtime)[0..2]; And you can take the beginning of the list

Re: Problem running the socket programming

2003-06-06 Thread anil adenan
The perl version of the server is 5.005_02. And now it gives error message - Can't locate Socket.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.. - Any ideas on this error? "LoBue, Mark" wrote: > > -Original Message- > > From: anil adenan [mailto:[EMAIL PROTECTED] > > Sent: S

Re: Is empty directory?

2003-06-06 Thread Jair Santos
Thanks all, it is simple and works. Jair - Original Message - From: "Mark G" <[EMAIL PROTECTED]> To: "Jair Santos" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 9:09 PM Subject: Re: Is empty directory? >> > Hi all, > > > > does anybody knows how to

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Rob Dixon
John W. Krahn wrote: > Mark Anderson wrote: > > > > B) You should NEVER use map in a void context. map works very hard > >to build up it's return value, so there should be an assignment > >(=) operator to the left of your map call almost always, otherwise > >all of that work is wasted.

Re: perl extensions

2003-06-06 Thread James Edward Gray II
On Friday, June 6, 2003, at 11:27 AM, Francis Henry wrote: Thanks Aman. I think I understand what he's trying to do - I'm more concerned that this is the common practice with perl and I wasn't aware of it. Know what I mean? I've at least heard of it before, if that tells you anything. I bel

Re: perl extensions

2003-06-06 Thread Francis Henry
Thanks Aman. I think I understand what he's trying to do - I'm more concerned that this is the common practice with perl and I wasn't aware of it. Know what I mean? Aman Raheja wrote: > What I think this note means to say it is to save the libraries ( small > subroutines saved as .pl in a diffe

Re: perl extensions

2003-06-06 Thread Aman Raheja
What I think this note means to say it is to save the libraries ( small subroutines saved as .pl in a different file, you might write for your program to make it look cleaner and by just doing require that .pl file you may use the subroutine.) All he's expecting to do is differentiate between the e

Re: Perl predefined variables

2003-06-06 Thread Josh Berkus
Sandip, > $ > Contains the subpattern from the > corresponding set of capturing parentheses from the > last pattern match, not counting patterns matched in > nested blocks that have been exited already. > (Mnemonic: > like \digits.) These variables are all read-only and > dynamically

Is empty directory?

2003-06-06 Thread Jair Santos
Hi all, does anybody knows how to check if a diretory is empty? TIA Jair

Perl predefined variables

2003-06-06 Thread sandip das
i wanted to know what variables like $1, $2 mean and so i was looking at the documentation for Perl predefined variables in this following link : http://www.perldoc.com/perl5.6/pod/perlvar.html $ Contains the subpattern from the corresponding set of capturing parentheses from the l

Re: problem with NET::FTP

2003-06-06 Thread lobach
Sorry guys... I found out I wasn't ending the while loop properly.. opps... the good news is that i have it working now.. Thanks anyway.. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello.. I am having some problems with this sub... I am trying to take some > input box and send

Module dependency within a script or installing

2003-06-06 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Any programatic way to check either a script for dependent modules or as you install something, then how to determine dependency if any? Thanks. Wags ;) ** This message contains information that is confidential and propri

perl extensions

2003-06-06 Thread Francis Henry
Hi: The following is a note from a colleague of which I am skeptical: "fyi .pl used to be used for both executables and libraries. A library is simply perl code located in a different file which is imported into another perl program with the 'require' keyword. Now that we hav

Re: Error

2003-06-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > Through much digging I found AddScrollbars was defined in Tk::Frame.. > > #!perl -w > # Pchopler.pl > use strict; > use Tk 800.000; > # These are all the modules that we are using in this script. > use Tk::Frame; > use Tk::TextUndo; > use Tk::Text; > use Tk::Scrollbar; >

RE: Binary Replace

2003-06-06 Thread Akens, Anthony
>Anthony Akens wrote: >> Hi all, >> I'm doing a text replace in a binary file, which works fine as long as the >> text I replace it with is the exact same length. If the text I put in is longer or >> shorter, the program that reads the file (not one I wrote) chokes and spews >> out a bunch of ga

Re: Binary Replace

2003-06-06 Thread Rob Dixon
Anthony Akens wrote: > Hi all, > I'm doing a text replace in a binary file, which works fine as long as the > text I replace it with is the exact same length. If the text I put in is longer or > shorter, the program that reads the file (not one I wrote) chokes and spews > out a bunch of garbage.

RE: Have script exec itself (was: Flush Everything)

2003-06-06 Thread Bob Showalter
Charles K. Clarkson wrote: > Bob Showalter <[EMAIL PROTECTED]>wrote: > > > Voodoo Raja wrote: > > > > > > there are more then enough to init manually. > > > > > > Is there any command I can use to kill any constants > > > assigned. > > > > One trick is to have your script exec() itself. > >

Re: Is empty directory?

2003-06-06 Thread Rob Dixon
Charles K. Clarkson wrote: > Rob Dixon <[EMAIL PROTECTED]> wrote: > > > sub nfiles { > > opendir my $dh, $_[0] or die $!; > > my @dir = readdir $dh; > > return scalar @dir; > > } > > That should be decremented by 2 to account for '.' > and '..'. It could also get the count using

Have script exec itself (was: Flush Everything)

2003-06-06 Thread Charles K. Clarkson
Bob Showalter <[EMAIL PROTECTED]>wrote: : Voodoo Raja wrote: : > : > there are more then enough to init manually. : > : > Is there any command I can use to kill any constants : > assigned. : : One trick is to have your script exec() itself. What would this do? I didn't understand Voodoo's

RE: Best way of using a variable thoughout a number of modules...

2003-06-06 Thread Bob Showalter
Hamish Whittal wrote: > Hi Everyone, > > I am needing to use some variables throughout all the modules that I > have created. I was wondering, bar setting them at the top of each > module, what the best means of doing this is. Perhaps setting an > environment variable, but what other ideas. The ul

RE: Is empty directory?

2003-06-06 Thread Charles K. Clarkson
Rob Dixon <[EMAIL PROTECTED]> wrote: : sub nfiles { : opendir my $dh, $_[0] or die $!; : my @dir = readdir $dh; : return scalar @dir; : } That should be decremented by 2 to account for '.' and '..'. It could also get the count using '()': sub is_empty_dir { return undef

Re: arrays and hashes

2003-06-06 Thread James Edward Gray II
On Friday, June 6, 2003, at 03:32 AM, R. Joseph Newton wrote: The player's name IS the number. No other numbering system is needed. The players name is NEVER stored in the hash, AFAIK. The name is used to feed a hashing function, which renders an index into the storage of the hash structure.

Re: lesson on multi-dimensional hashes?

2003-06-06 Thread Randal L. Schwartz
> "Stuart" == Stuart White <[EMAIL PROTECTED]> writes: Stuart> I've a problem that I think is best solved with Stuart> multi-dimensional hashes. However, the reference that Stuart> I'm using doesn't really cover them. Does anyone know Stuart> where I might find some tutorial article of some

RE: Best way of using a variable thoughout a number of modules...

2003-06-06 Thread Sulabh Agarwal
You can create a "header" module and declare the variable there. Export the variable from the header module. Wherever you use the header module, you can access the variable has ::variable. This way you can change the value of the variable in the header module and it will change wherever it is acces

Best way of using a variable thoughout a number of modules...

2003-06-06 Thread Hamish Whittal
Hi Everyone, I am needing to use some variables throughout all the modules that I have created. I was wondering, bar setting them at the top of each module, what the best means of doing this is. Perhaps setting an environment variable, but what other ideas. The ultimate goal is to be able to chang

Perl, Apache, Mason, Windows XP pro - nmake

2003-06-06 Thread Paul Kraus
I am installing html::mason. I have activestate perl installed. I have apache installed. I have mod_perl installed. I have download Mason and am trying to install the prerequisites and the optional packages listed in the readme. None of them where available from ppm. So I have downloaded the sou

Binary Replace

2003-06-06 Thread Akens, Anthony
Hi all, I'm doing a text replace in a binary file, which works fine as long as the text I replace it with is the exact same length. If the text I put in is longer or shorter, the program that reads the file (not one I wrote) chokes and spews out a bunch of garbage. Is there a way in perl to deal

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Mark Anderson wrote: > > > > B) You should NEVER use map in a void context. map works very hard > >to build up it's return value, so there should be an assignment > >(=) operator to the left of your map call almost always, > >otherwise all o

problem with NET::FTP

2003-06-06 Thread lobach
Hello.. I am having some problems with this sub... I am trying to take some input box and send it to a file on a remote system.. Well, that works ok, but I would like to rename the file when I am done, because a process polls for the file.. Anyhow, I think my code is not releasing the handle on the

Re: Hey, I mapped something without training wheels

2003-06-06 Thread John W. Krahn
Mark Anderson wrote: > > B) You should NEVER use map in a void context. map works very hard >to build up it's return value, so there should be an assignment >(=) operator to the left of your map call almost always, otherwise >all of that work is wasted. I would never say NEVER as the

Re: Hey, I mapped something without training wheels

2003-06-06 Thread John W. Krahn
Kevin Pfeiffer wrote: > > (Forgive the excitement) > > I just reversed the %n2m construct - the original builds a hash using map > that lets you convert numbers to months, etc. (I probably found it here). > > In keeping with my feeling that with 'map' one can do almost anything (if I > knew how)

Re: Cant seem to understand

2003-06-06 Thread Rob Dixon
John W. Krahn wrote: > Bernhard Van Staveren wrote: > > > > There is an easier way (sorta) to get hours/minutes/seconds; > > > > ($seconds, $minutes, $hours)=splice(localtime(), 0, 3); > > Did you try this? No, I didn't think so. :-) > > splice() will only work with array not lists. ... but (as

Re: Cant seem to understand

2003-06-06 Thread Bernhard van Staveren
Weird... I used it before on my server and it gave me the expected results - unless someone did a custom job on localtime() or something I wouldn't know why it did work at the time. Either that or I'm really confused and I imagined this'd work ;) (also an option) On Thu, 5 Jun 2003, John W. Krah

RE: Hey, I mapped something without training wheels

2003-06-06 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Mark Anderson wrote: [...] > "A guy with a hammer sees all his problems as nails." --Old software > saying [...] But it's much easier to figure out what to do with a hammer than it is with just a nail. ;-) Thanks all for the lesson(s) and tips. -K -- Kevin P

Re: Documentation on Usin with.......

2003-06-06 Thread Shlomi Fish
On Thu, 5 Jun 2003, Saurabh Singhvi wrote: > well if somebody can tell me how to use perl with my > website. the main thing i want to use is password > function. Any helps?? > Do you know Perl at all? If so, you can find a tutorial for CGI programming here: http://perl-begin.berlios.de/cgi-bin/

Re: Cant seem to understand

2003-06-06 Thread John W. Krahn
Bernhard Van Staveren wrote: > > There is an easier way (sorta) to get hours/minutes/seconds; > > ($seconds, $minutes, $hours)=splice(localtime(), 0, 3); Did you try this? No, I didn't think so. :-) splice() will only work with array not lists. John -- use Perl; program fulfillment -- To

RE: Flush Everything

2003-06-06 Thread Bob Showalter
Voodoo Raja wrote: > Hi there > > I have got a script running.. > > Its ment to repeat a particular sub routine using the "after" syntax > > All i want to do is clear everything in buffer ... since it eats up > the memory > > > I do not need any varaibles which I have defined in the sub. If

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Rob Dixon
Jenda Krynicky wrote: > From: Kevin Pfeiffer <[EMAIL PROTECTED]> > > In keeping with my feeling that with 'map' one can do almost > > anything > > quite right, but > > > (if I knew how) I'm happy to have managed to build something using > > 'map' (without external help I mean). Seems easy, now. ;-)

RE: Documentation on Usin with.......

2003-06-06 Thread Dan Muey
Try http://search.cpan.org Search for CGI.pm HTH > -Original Message- > From: Saurabh Singhvi [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 1:11 PM > To: Perl FAq > Subject: Documentation on Usin with... > > > well if somebody can tell me how to use perl with my > websi

Re: crypt-blowfish module

2003-06-06 Thread Lance
try www.cpan.org It's for all things Perl. ;-) "Joel_divekar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All > > I am using Activestate Perl on win9x and wish to install crypt-blowfish module. Activestate module repository does not have this module. Any advice. > > Regards >

Documentation on Usin with.......

2003-06-06 Thread Saurabh Singhvi
well if somebody can tell me how to use perl with my website. the main thing i want to use is password function. Any helps?? Regards Saurabh = SAURABH SINGHVI H-8,ROOM NO.291 IIT BOMBAY POWAI MUMBAI ___

RE: Hey, I mapped something without training wheels

2003-06-06 Thread Mark Anderson
> (Forgive the excitement) Not a problem. Congratulations. > I just reversed the %n2m construct - the original builds a hash using map > that lets you convert numbers to months, etc. (I probably found it here). > > In keeping with my feeling that with 'map' one can do almost anything (if I > kne

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Chris Zimmerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I must say that since joining this list I have had many days brightened by yet another cool piece of code. The neat-o meter gets pegged almost everyday. :-) On Thursday 05 June 2003 12:49, Jenda Krynicky wrote: > From: Kevin Pfeiffer <[EMAIL P

Re: Hey, I mapped something without training wheels

2003-06-06 Thread Jenda Krynicky
From: Kevin Pfeiffer <[EMAIL PROTECTED]> > In keeping with my feeling that with 'map' one can do almost anything quite right, but > (if I knew how) I'm happy to have managed to build something using > 'map' (without external help I mean). Seems easy, now. ;-) > > # months into numbers... > > $m

crypt-blowfish module

2003-06-06 Thread joel_divekar
Hi All I am using Activestate Perl on win9x and wish to install crypt-blowfish module. Activestate module repository does not have this module. Any advice. Regards Joel Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com Buy The Best In BOOKS at http://www.bestsellers

RE: Hey, I mapped something without training wheels

2003-06-06 Thread Dan Muey
> (Forgive the excitement) > No problem! > I just reversed the %n2m construct - the original builds a > hash using map > that lets you convert numbers to months, etc. (I probably > found it here). > > In keeping with my feeling that with 'map' one can do almost > anything (if I > knew how)

Hey, I mapped something without training wheels

2003-06-06 Thread Kevin Pfeiffer
(Forgive the excitement) I just reversed the %n2m construct - the original builds a hash using map that lets you convert numbers to months, etc. (I probably found it here). In keeping with my feeling that with 'map' one can do almost anything (if I knew how) I'm happy to have managed to build s

Re: Cant seem to understand

2003-06-06 Thread Bernhard van Staveren
> thanks a lot frank..i think i hav got the thing. > > Regards > > Saurabh There is an easier way (sorta) to get hours/minutes/seconds; ($seconds, $minutes, $hours)=splice(localtime(), 0, 3); -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField Internet - http://www.gho

Re: Cant seem to understand

2003-06-06 Thread Saurabh Singhvi
thanks a lot frank..i think i hav got the thing. Regards Saurabh --- Frank Wiles <[EMAIL PROTECTED]> wrote: > .--[ Saurabh Singhvi wrote (2003/06/05 at > 07:57:14) ]-- > | > | well i cant understand what the $1, $2 and $3 > do?? > | herez the code > | > | #!/usr/local/b

Re: Is empty directory?

2003-06-06 Thread Rob Dixon
Jair Santos wrote: > Hi all, > > does anybody knows how to check if a diretory is empty? Does this suit what you want? It's got very inelegant error handling but should suffice for most purposes. use strict; print nfiles('/usr/bin'); sub nfiles { opendir my $dh, $_[0] or die $!; m

Re: Flush Everything

2003-06-06 Thread Lance
You could 'delete' or 'undef' variables you don't want. But I sense that you want a bigger wiper than that... If you define variables using 'my' in the sub, Perl's gargbage collection should annihilate them when it has time/needs resources. It might even eliminate them as soon as you exit the sub

Why "Can't locate auto/Heap/add.al"?

2003-06-06 Thread Ying Liu
I finally install the Heap module. But I run the example of the CPAN: foreach $i ( 1..100 ) { $elem = NumElem($i); $heap->add($elem); } It told me: Can't locate auto/Heap/add.al in @INC I search this directory but didn't find the add.al, is it caused by the wrong installing o

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
Stuart White wrote: > This does make it clearer, but not entirely. Is this > what is happening: the loop starts, and goes > immediately into the if statement. when the regex > finds a line with "Jump Shot" it stores that in $2, > and the player name in $1. The next thing it does, > and I'm not

RE: Cant seem to understand

2003-06-06 Thread Dan Muey
> well i cant understand what the $1, $2 and $3 do?? > herez the code Howdy > if ($date =~ /(\d\d):(\d\d):(\d\d)/) ^ ^ ^ $1 $2 $3 The $1,$2,$3 etc hold the parenthesis matched contents in a regex. HTH DMuey -- To unsubscribe, e-mail: [E

Re: Cant seem to understand

2003-06-06 Thread Frank Wiles
.--[ Saurabh Singhvi wrote (2003/06/05 at 07:57:14) ]-- | | well i cant understand what the $1, $2 and $3 do?? | herez the code | | #!/usr/local/bin/perl -w | | # Get the date in the standard date format. (ex: Tue | Oct 24 19:03:03 | 1995 ) | my $date = localtime();

RE: Cant seem to understand

2003-06-06 Thread Shah, Urmil
This would be more clear to you ($sec,$min,$hr,$day,$mon,$year)=localtime(time); $year +=1900; $mon=$mon+1; Urmil -Original Message- From: Saurabh Singhvi [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 9:57 AM To: Perl FAq Subject: Cant seem to understand well i cant understan

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
Stuart White wrote: > Ok, I think I get it. the $_ is printing the player > name, (though I don't know why I'm not using $1 $1 is a special-purpose variable used only in relation to regexes. The default variable for looping structures will be contained in $_. > > instead for that) and the $line

Cant seem to understand

2003-06-06 Thread Saurabh Singhvi
well i cant understand what the $1, $2 and $3 do?? herez the code #!/usr/local/bin/perl -w # Get the date in the standard date format. (ex: Tue Oct 24 19:03:03 1995 ) my $date = localtime(); # Search through the date looking for the hour, minute, and second. if ($date =~ /(\d\d):(\d\d):(\d\d)/)

RE: lesson on multi-dimensional hashes?

2003-06-06 Thread NYIMI Jose (BMB)
perldoc perldsc http://www.perldoc.com/perl5.8.0/pod/perldsc.html#HASHES-OF-HASHES Perldoc perlreftut http://www.perldoc.com/perl5.8.0/pod/perlreftut.html HTH, José. > -Original Message- > From: Stuart White [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 4:26 PM > To: [EMAIL

Re: Where is @INC saved and other installation issues

2003-06-06 Thread Peter Scott
In article <[EMAIL PROTECTED]>, I wrote: >If you were installing a binary, then try installing the source. >You should be able to zip through by saying > > ./Configure -de -Uprefix=/usr That should have course have been ./Configure -de -Dprefix=/usr -- Peter Scott http://www.perlde

Re: lesson on multi-dimensional hashes?

2003-06-06 Thread James Edward Gray II
On Thursday, June 5, 2003, at 09:26 AM, Stuart White wrote: I've a problem that I think is best solved with multi-dimensional hashes. However, the reference that I'm using doesn't really cover them. Does anyone know where I might find some tutorial article of some sort with an example or two on

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
Stuart White wrote: > Hey, thanks that worked! > > --- James Edward Gray II <[EMAIL PROTECTED]> > wrote: > > > I don't seen any reason to use the array at all, so > > I've removed it. > > If you had one that I just didn't know about, send > > it on back. > > That's how I tried to solve this piece

Re: arrays and hashes

2003-06-06 Thread R. Joseph Newton
Stuart White wrote: > > Right now my array is just like that, minus the > numbers. So what I want to do is assign the array to > a hash. If I were to do that, my understanding is > that the names would be keys and the numbers values, > and doing such an assignment in a loop would cause > some en

RE: Using defined array with split command

2003-06-06 Thread Shah, Urmil
$data = "A Tab Separated DataFile"; @fields=split(/\t/,$data); print "$fields[0] , $fields[1], $fields[2] , $fields[3] "; Urmil -Original Message- From: Scott, Joshua [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 2:27 AM To: beginners Subject: Using defined ar

lesson on multi-dimensional hashes?

2003-06-06 Thread Stuart White
I've a problem that I think is best solved with multi-dimensional hashes. However, the reference that I'm using doesn't really cover them. Does anyone know where I might find some tutorial article of some sort with an example or two on multi-dimensional hashes? I know that the syntax for referri

Re: Little nonsense script stats script

2003-06-06 Thread R. Joseph Newton
Jaschar Otto wrote: > I'm always an very curious guy and i just because of that i made a little > script that analyises my scripts, extracts the subs, counts lines, > mys, uses, subs, etc... maybe some of you are as courious as i am > but too lazy to do that for yourself, so i want to share it wit