Re: Comparing Arrays

2001-07-19 Thread Aaron Craig
At 15:21 19.07.2001 +0200, Diego Riaño wrote: >Hi everybody > >I have two array, like this > >@array1=(one, two, three); >@array2=(one,tww,three); > >Is there some way to compare the two arrays? >I was trying with the eq and ne operations inside an IF statement but i >does not work > >Could someon

Re: looking at rows in text files

2001-07-18 Thread Aaron Craig
How about: use strict; open(IN, "file.txt") || die("RRRGGGHHH $!"); while() # loop through file setting each line to $_ { chomp; # lose newline /^([^\s]+)\s/; # look for anything at the beginning of the string up to the first space or tab character and remembe

Re: getting first character of item

2001-07-13 Thread Aaron Craig
At 21:55 13.07.2001 +1000, Mal Beaton wrote: >I am stuck on the foreach loop getting the first character of $user > >foreach $user (keys %{users{abc}}){ >### trying to get the first character of $user here my $fc = substr($user, 0, 1); # $fc now contains the first character of $

Re: C & Perl for loops

2001-07-13 Thread Aaron Craig
How do I access each character in a string with Perl? TIA... check out perldoc perlfunc -- there's a whole section on built in string functions to get the length of a string use length (surprised?) my $sString = "foo bar"; print length($sString)."\n"; Aaron Craig Programming iSoftitler.com

Re: multiple entry/exit points

2001-07-12 Thread Aaron Craig
ny other language I happen to be writing in. I've seen a lot of code with 10's of embedded blocks, all with conditions that guide the flow to a final destination -- it's so ugly! What's wrong with putting all of your error checking at the top of your function, and then jumping out if you run into something you don't like. It makes the meat of the function easier to read. Aaron Craig Programming iSoftitler.com

RE: printf

2001-07-12 Thread Aaron Craig
At 09:52 12.07.2001 +0100, Govinderjit Dhinsa wrote: >Does any body know why the printf is not printing anything out! > >I tested the rest of the script by replacing the printf line with, >## >print "$line"; >## >the file prints (with out any changes to the file, as expected). So >

[OT] in my own defence (was RE: Is there an alternative to CGI ???)

2001-07-11 Thread Aaron Craig
A colleague just pointed out this link for me, and I may have accidentally gotten the correct definition for CGI in my generalization. At any rate, for those who are interested: http://cgi-spec.golux.com/draft-coar-cgi-v11-03-clean.html Aaron Craig Programming iSoftitler.com

RE: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
t -- apologies for the quick response. Aaron Craig Programming iSoftitler.com

Re: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
At 01:14 11.07.2001 -0800, Michael Fowler wrote: >On Wed, Jul 11, 2001 at 10:28:46AM +0200, Aaron Craig wrote: > > You may be confusing your terms here. CGI (Common Gateway Interface) is a > > general term that is used to describe the various methods used to > > commu

Re: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
e Internet has some >disadvantages, prominent is the increased use of memory. > > Is there another alternative for connecting Perl with the Internet >other than CGI (Like maybe using Perl with ASP!!!) > > >George Savio Pereira >^^^^^^^^ >Email : [EMAIL PROTECTED] Aaron Craig Programming iSoftitler.com

Re: Help: Searching an array question++

2001-07-10 Thread Aaron Craig
t the value contained in the variable $sFindGIF print ("$index: $_\n"); $s = $array[$index]; why do you create the variables and then not use them? Use $sFindGIF and $sSwapGIF here. $s =~ s/this.gif/that.gif/; close (TESTFILE); Aaron Craig Programming iSoftitler.com

RE: newbie whitespace question

2001-07-10 Thread Aaron Craig
(just in >case :) Before everyone jumps, the tabs/spaces foot in my mouth has already been pointed out to me. I won't even try to make an excuse...there is none :) Aaron Craig Programming iSoftitler.com

Re: PRELOADING IMAGES FOR A WEB SITE

2001-07-10 Thread Aaron Craig
ng with using JavaScript for doing the job it was created for -- that is, controlling dynamic content on a web page. My more involved pages often use a mix of Perl on the server, and JavaScript and C++ (in the form of a plug in) on the page. Just for kicks, I throw some Flash and ActionScri

RE: newbie whitespace question

2001-07-10 Thread Aaron Craig
^Kilobytes:(.*)$/ ) { > $var = $1 ; >} >} > >This will set $var to " 3452" for example, I want to strip out the >whitespace to only get "3452". > >Any thoughts appreciated, > >-Nat Aaron Craig Programming iSoftitler.com

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 04:29 09.07.2001 -0800, Michael Fowler wrote: >On Mon, Jul 09, 2001 at 01:59:28PM +0200, Aaron Craig wrote: > > You are correct -- I should have read the documention :) However, in > every > > day programming-speak, list and array get tossed about in such a way th

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
ven say that a list is an array that you can't mess with. Which brings up a question on my part. Are there any examples of the use of an array and the use of a list where labelling them differently make something different happen? IE foreach (0..9); # list, correct? foreach (@array); # array to the average programmer, how does calling 0..9 an array screw them up? Aaron Craig Programming iSoftitler.com

Re: remplace ...

2001-07-09 Thread Aaron Craig
ot;); # added error check open (OUT, "c:\\test\\test_output.txt") || die("Couldn't open c:\\test\\test_output.txt: $!"); while() { $_ =~ s/html/php/g; print OUT $_; } close TRANS; close OUT; now, you have a new file, test_output.txt, which contains the substituted text Aaron Craig Programming iSoftitler.com

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 16:30 09.07.2001 +0530, baby lakshmi wrote: >hi, >What is the difference between list and an array?? >May be this very small question. but i would like to know the difference. >The help in this regard is appreciated. >Thank you >Regards >babylakshmi There isn't one.

Re: R: download a file

2001-07-09 Thread Aaron Craig
>> > >>I need to be able to save to disk... > > >Why don't you just do > >print qq~http://my.host.com/name_of_file.xxx";>Shift-click to get > >file~; > >then? :-) Safest of all print qq~http://my.host.com/name_of_file.xxx";>Right-click and select "Save Target As..." to get file~; Aaron Craig Programming iSoftitler.com

Re: Loading a comma delimited file into a hash.

2001-07-07 Thread Aaron Craig
atch!\n" if(scalar(@f1fname) != $f1fnum); > >Actually, if I had been thinking in these terms, it would be easier to >make Perl count how many fields they entered, rather than having them >count it. So... >scalar(@f1fname)=$f1fnum; >might be better... Do you mean $f1fnum = scalar(@f1fname); ? Aaron Craig Programming iSoftitler.com

Re: download a file

2001-07-07 Thread Aaron Craig
And calling the script from the location bar is not very >usefull, since what I want is to have a list of all my files in my browser >window and simply be able to click on one to download it to my disk. > >Anyone can Help ? If you want more information to help just ask. > >Thank you very much for your time. > >Frédéric Fortin, >[EMAIL PROTECTED] >TPC Communications Aaron Craig Programming iSoftitler.com

Re: Loading a comma delimited file into a hash.

2001-07-06 Thread Aaron Craig
he field counts line up { print "malformed line\n"; close FILE; exit; } my $lCount = 0; foreach my $sFieldName (@f1fname) { $rhNameValue->{$sFieldName} = $asFields[$lCount]; $lCount++; } push(@{ $raRecords }, $rhNameValue); } now you've got an array ref $raRecords with n hash refs $rhNameValue. Each hash ref contains a key for each field your user defined, with its value being the field it grabbed out of the file Aaron Craig Programming iSoftitler.com

Re: NET::IRC

2001-07-06 Thread Aaron Craig
be changed to whatever server is hosting this connection -- and I'd be that Nick should be changed to a valid nickname. > my $conn = $irc->newconn(Nick => 'GH-[bot]', >Server => 'some.server.com', >Port => 6668); Aaron Craig Programming iSoftitler.com

Re: I did it!!!

2001-07-06 Thread Aaron Craig
At 08:31 06.07.2001 -0400, Jeff 'japhy' Pinyan wrote: >On Jul 6, Aaron Craig said: > > >print "The result,"; > >sleep(2); > >print " you ignorant fool,"; > >sleep(2); > >print " is: $result\n"; > >You'd

Re:Menu

2001-07-06 Thread Aaron Craig
ubroutines > >.. > >my $cc = $mnu1->cascade(-label=>'~Language'); > >$cc-> checkbutton (-label=>'Generic Alcatel', -variable => \$GENERIC); >$cc-> checkbutton (-label=>'French', -variable => \$FRENCH); > > >But now I have nothing displayed,neither Client ethernet adress nor Adresse >Ethernet du Client. > >Why ? Thanks Aaron Craig Programming iSoftitler.com

Re: How to print char '\' ?

2001-07-06 Thread Aaron Craig
line 2. > >How i may print that symbol ? Perl running on Linux console. Aaron Craig Programming iSoftitler.com

Re: I did it!!!

2001-07-06 Thread Aaron Craig
int "The result,"; sleep(2); print " you ignorant fool,"; sleep(2); print " is: $result\n"; Aaron Craig Programming iSoftitler.com

Re: Absolute Path

2001-07-06 Thread Aaron Craig
ip file in >a cgi script. > >Here's my code. > >while($i < ($#filelist)) >{ > if ((@filelist[$i] ne '.') && (@filelist[$i] ne '..')) > { > print " \"ftp\\public\\downloads\\assortedfiles\\@filelist[$i]\">@filelist[$i]"; > print "\n"; > } > $i++; >} Aaron Craig Programming iSoftitler.com

RE: \r

2001-07-05 Thread Aaron Craig
$fields[6] =~ s\r//; > > for (@fields) { print NEW "$_" } > } > close CSV; > close NEW; > exit; > > [End of file] > Aaron Craig Programming iSoftitler.com

Re: Loops - Killing of Process on Win2k.

2001-07-04 Thread Aaron Craig
encoolen, Email : >[EMAIL PROTECTED] >Bencoolen Street, Singapore - 189648 ICQ : 121001541 >Website : www.myangel.net >~~~ Aaron Craig Programming iSoftitler.com

Re: error

2001-07-04 Thread Aaron Craig
ou, and insist on using Windows "features", which you may or may not want. Aaron Craig Programming iSoftitler.com

RE: Editor

2001-07-04 Thread Aaron Craig
ide >which language is going to give us the most flexibility and power. You say that like you only want to learn one language :) I use a mixture of Perl and C++ for the guts of a program, and Visual Basic and JavaScript/HTML for the interface part, depending on where the program has to live. Aaron Craig Programming iSoftitler.com

Re: Windows2000

2001-07-03 Thread Aaron Craig
Extensions. > >They advised us to use our "Network Places" instead for file transfer. > >Does anyone know how we can tell our Windows2000 Professional Operating >system (Network Places) that it is moving a .pl or .cgi, ect file so that >we can be sure it does it in ASCII? > > > >Thanks, >RL > Aaron Craig Programming iSoftitler.com

Re: conversion Perl<->HTML

2001-07-02 Thread Aaron Craig
print "cols=\"50\">$texte"; : in the "textarea", there is "First line >\n Second Line" but I want: >First line >Second Line". > >But, if a write $texte="First line \n Second Line" before the HTML code, >the text is correct. > >How can I convert the text from the file to the "textarea"? > > >tks. > Aaron Craig Programming iSoftitler.com

Re: Web Page Interaction...

2001-06-29 Thread Aaron Craig
tion you can point me in.. > >Craig >[EMAIL PROTECTED] >Pager >Numeric: 1-877-895-3558 >Email pager: [EMAIL PROTECTED] >-- >You will never find time for anything. >If you want time, you must make it. > >Charles Buxton Aaron Craig Programming iSoftitler.com

Re: is this a structure of some kind?

2001-06-29 Thread Aaron Craig
ir ; > $session = $session_path[$#session_path] ; > print "\n Checking $session:" ; > > ALL_STUDIES: foreach $study (@studies) { > chomp $study; > $numfound = 0; > @hits = (); # new list > >-- > >the items in CAPS: are so

Re: confusing Perl idioms and practices

2001-06-29 Thread Aaron Craig
t's going on. Many will argue (correctly) that no decent programmer would name his or her variables $x and $y outside of a for loop. However, rejecting readability out of hand as catering to beginners leads to similar behavior. I always prefer an extra line of code in the spirit of readab

Re: Joining variables

2001-06-27 Thread Aaron Craig
32nd day of Confusion in the YOLD 3167 > > Wibble. > > > > > > > >or > >$newvar='';$newvar .= "$_-" foreach ($var1, $var2, $var3); chop $newvar; > >or > >$newvar = sprintf "%04d-%02d-%02d", $var1, $var2, $var3; > >or > >$newvar =~ s/.*/$var1-$var2-$var3/; > >I think I need a life. > >-- >Today is Pungenday, the 32nd day of Confusion in the YOLD 3167 >Kallisti! Aaron Craig Programming iSoftitler.com

Re: Converting Unix paths to windows

2001-06-27 Thread Aaron Craig
; to "/" and getting rid of the drive you can do this: my $sPath = "C:\\foo\\bar"; $sPath =~ s/^[a-z]+://i; $sPath =~ s/\\/\//g; print $sPath; Aaron Craig Programming iSoftitler.com

Re: Debugging the CGI - Application

2001-06-27 Thread Aaron Craig
rom: "Me" <[EMAIL PROTECTED]> >To: "Rajeev Rumale" <[EMAIL PROTECTED]>; "'Beginner Perl'" ><[EMAIL PROTECTED]> >Sent: Wednesday, June 27, 2001 11:13 AM >Subject: Re: Debugging the CGI - Application > > > > > Any mor

Re: chomp ?

2001-06-26 Thread Aaron Craig
At 11:03 26.06.2001 -0400, Kevin Meltzer wrote: >I think this is a very contradictory answer.. since if we were to RTFF >(last F for FAQ) we would know not to answer in this way. It is not >useful. Which FAQ? (seriously) :) Aaron Craig Programming iSoftitler.com

Re: chomp ?

2001-06-26 Thread Aaron Craig
At 16:34 26.06.2001 +0200, Stéphane JEAN BAPTISTE wrote: >What is chomp ? > >tks It chops off the new line/return character when reading in a file. It's kind of magical, in that in changes the character it looks for depending on the system its run on. Aaron Craig Programming iSoftitler.com

Re: Reading Code

2001-06-25 Thread Aaron Craig
27;' ); > > return(-811) if ( $acc_fields[1] eq "" ); > > return(-812) if ( $acc_fields[2] eq "" ); > > return(-813) if ( $acc_fields[7] < 0 ); > > $acc_fields[8] = &get_date if ( $acc_fields[8] eq '' ); > > > > return(&send_ddc("tdilc5110b000","accum_cycle_count",@acc_fields)); Aaron Craig Programming iSoftitler.com

Re: to copy a file (with perl)

2001-06-25 Thread Aaron Craig
In the spirit of TMTOWTDI - At 07:20 25.06.2001 -0700, Paul wrote: >the brute force approach: =o) > > open IN, $fileor die $!; > open OUT, ">$new" or die $!; > print OUT $line while defined($line=); > close OUT; > close IN; print OUT $_

Re: types of datas

2001-06-25 Thread Aaron Craig
it into a variable. >I have a loop (while) with a value which have different values. >The problem is that when I compare the first and the second value: If >they're really equals, the program say they are'nt. > >Is ther a function to convert a value into an integer ? > >tks > >(sorry for my english :-) ) Aaron Craig Programming iSoftitler.com

Re: I need some help ...

2001-06-25 Thread Aaron Craig
At 11:43 25.06.2001 +0200, [EMAIL PROTECTED] wrote: >En réponse à Aaron Craig <[EMAIL PROTECTED]>: > > > foreach my $fichier (@fichiers) > > { > > my $result = (-e $fichier)? "$fichier fait (stat $fichier)[7] > >

Re: /g

2001-06-25 Thread Aaron Craig
you want an array of all the substrings that are the matches: my @asMatches = $string =~ /a/g; # @asMatches is now an array containing 3 elements, each of which is equal to "a" Aaron Craig Programming iSoftitler.com

Re: Opening a file, but adding the date to the name

2001-06-25 Thread Aaron Craig
round than strings, and a file name composed of numbers is always guaranteed to be legal, while a string may contain characters that aren't allowed in file names by the operating system. Aaron Craig Programming iSoftitler.com

Re: I need some help ...

2001-06-25 Thread Aaron Craig
#Want to check another file in the future? Add it to the array, and you're done! foreach my $fichier (@fichiers) { my $result = (-e $fichier)? "$fichier fait (stat $fichier)[7] octets\n" : "$fichier inexistant \n"; print RESULT $result; } } close RESULT; Aaron Craig Programming iSoftitler.com

Re: 2 regex questions

2001-06-25 Thread Aaron Craig
At 08:14 22.06.2001 -0800, Michael Fowler wrote: >On Fri, Jun 22, 2001 at 04:26:43PM +0200, Aaron Craig wrote: > > $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/); > >Or, more succinctly: > > $results{$test}++ if /joe/ && !/fred/; I'm still trying

Re: 2 regex questions

2001-06-22 Thread Aaron Craig
does >not contain another word? something similar to > grep joe output | grep -v fred $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/); Aaron Craig Programming iSoftitler.com

RE: Komodo

2001-06-22 Thread Aaron Craig
east. Has anyone come out with a working environment for perl. print "my error message" and print "my variable value" is great, but I'd love to be able to step through a perl script and watch my variables as I go. Aaron Craig Programming iSoftitler.com

Komodo

2001-06-22 Thread Aaron Craig
Any ideas? Aaron Craig Programming iSoftitler.com

Re: output in specified order

2001-06-22 Thread Aaron Craig
N "Date/Time Stamp,ORA-1: unique constraint violation,"; >print SFN"Fault 2-001,Fault 2-002,Fault 2-003,Fault 2-004,Fault 2-005,"; >print SFN "Fault 2-006,Fault 2-007,Fault 2-008,Fault 2-009,Fault 2-010,"; >print SFN "Fault 2-011,Fault 2-012,Fault 2-013,Fault 2-015,"; >print SFN "Bind to Factory Failure,SystemException,Communication failure,"; >print SFN "ORB problem,Get Q Error,# of clients still running,"; >print SFN "# of PricingSessions still running,# of clients Finished Test,"; >print SFN "smtx / syscl,user %,sys %,wt %,idl %,current load average\n"; > >seeing that this is a hash, there is absolutely no guarantee that the output >will be >correct when it is printed. I could sort the hash, but the order is still >wrong. > >any suggestions? > >Regards, >Ron > >P.S >don't be to critical of the print's above, yes there are a few extra >elements in it. >Those are generated outside the hash and can be plopped into the output >where need be. I am >mainly concerned with the proper output of the hash in the order >specified Aaron Craig Programming iSoftitler.com

Re: compilation errors in win98

2001-06-22 Thread Aaron Craig
At 09:55 22.06.2001 +0100, james crease wrote: >I still think it odd that the distribution of Perl for Windows doesn't >mention this problem when using the standard M$ command window. The problem disappears with Win2000, fwiw. Aaron Craig Programming iSoftitler.com

Re: compilation errors in win98

2001-06-21 Thread Aaron Craig
gram is really worth the 35 bucks. Aaron Craig Programming iSoftitler.com

Re: Recursive subrutines

2001-06-21 Thread Aaron Craig
roupForSharing"); > > &createBranch(); > @childBRNodes = $item->getChildNodes(); > if (scalar(@childBRNodes) > 0) > { > &buildBranch(@childBRNodes); > } > } > @childNodes = $item->getChildNodes(); > if (scalar(@childNodes) > 0) > { > &buildBranch(@childNodes); > } > } >} Aaron Craig Programming iSoftitler.com

RE: PERL PROGRAM HELP!

2001-06-21 Thread Aaron Craig
a cleaner and easier-to-read way to do this. However, if you look at the docs for printf, and compare the input and output files you should be able to figure out exactly how the lines are getting formatted and printed. Aaron Craig Programming iSoftitler.com

Re: combining lines in a tagged text file

2001-06-19 Thread Aaron Craig
pages) >!TS #notice that the first of the two lines remain, and the second is >properly >removed > #the lines are also combined as I want them. The 'old' and 'new' > tags are >for my viewing >old Modified by Rev. Rul. 2000-4 >new Modified and Amplified by Rev. Rul. 2000-4 >old Superseded by Rev. Rul. 2000-56 >new Superseded and Supplemented by Rev. Rul. >2000-56 >!GI >United States >!IA >Internal Revenue Service >!DP >30 Nov 1999 >!PD >01 Dec 1999 >. . . Aaron Craig Programming iSoftitler.com

Re: combining lines in a tagged text file

2001-06-19 Thread Aaron Craig
pages) >!TS #notice that the first of the two lines remain, and the second is >properly >removed > #the lines are also combined as I want them. The 'old' and 'new' > tags are >for my viewing >old Modified by Rev. Rul. 2000-4 >new Modified and Amplified by Rev. Rul. 2000-4 >old Superseded by Rev. Rul. 2000-56 >new Superseded and Supplemented by Rev. Rul. >2000-56 >!GI >United States >!IA >Internal Revenue Service >!DP >30 Nov 1999 >!PD >01 Dec 1999 >. . . Aaron Craig Programming iSoftitler.com

Re: binaries of DBI, DBD::mysql, CGI

2001-06-19 Thread Aaron Craig
is wrong) on them -- this allows them to set themselves up in the proper directory with the proper files where they need to be. However, you do not need to compile them -- this gets done at run time by the Perl compiler itself. Aaron Craig Programming iSoftitler.com

Utf8 and length()

2001-06-15 Thread Aaron Craig
to weirdness with the Utf8 pragma. The problem is this - print length($utf8_text) . "\n"; # 11 ! Anyone have any experience with this? I've checked the utf8 manpage, but they gloss over length(), including it in a list of functions that should continue to operate on characters, not bytes. In fact, this is the problem -- utf8 seems to consider æ two characters. Thanks in advance Aaron Craig Programming iSoftitler.com

references for making regexes go faster

2001-06-15 Thread Aaron Craig
references for making regexes go faster I saw this mentioned in another post. Care to elaborate anyone? Aaron Craig Programming iSoftitler.com

Re: checking for the @ symbol

2001-06-12 Thread Aaron Craig
print "You're cheating!" if($add_alias =~ /[^\w.\-]/); thanks for pointing that out! Aaron Craig Programming iSoftitler.com

Re: use of split command

2001-06-12 Thread Aaron Craig
feel this >is probably simple but err...not to me. > >Alternatively if you can tell me how to reference just the second part of >the line in a loop like e.g. >for($i=0; $i < $ets_count; $i++) >{ >seq->some_function_of(the second column of @ets[$i} >} > >maybe that would be quicker??? Aaron Craig Programming iSoftitler.com

Re: checking for the @ symbol

2001-06-12 Thread Aaron Craig
is not A-Za-z0-9\.\-_ which fits nicely into the following regular expression print "You're cheating!" if($add_alias =~ /[^A-Za-z0-9\.\-_]/g); or even more concise print "You're cheating!" if($add_alias =~ /[^\w\.\-]/g); # \w Match a "word" character (alphanumeric plus "_") Aaron Craig Programming iSoftitler.com

Re: [META] Rants (was:Re: space)

2001-06-11 Thread Aaron Craig
es us to push more buttons, just so that we do it differently from the rest of the world. I'm sure that's not the situation with this list, but the reply-to conversation brought the tech issue to mind, and perhaps that's why I joined in the fray in the first place. I

Re: [META] Rants (was:Re: space)

2001-06-11 Thread Aaron Craig
bscribed to, this is the only one configured in this way. Aaron Craig Programming iSoftitler.com

Re: [META] Rants (was:Re: space)

2001-06-11 Thread Aaron Craig
ich a portion are unnecessary duplicates. Aaron Craig Programming iSoftitler.com

Re: [META] Rants (was:Re: space)

2001-06-11 Thread Aaron Craig
wanted to do it, I'd do Reply To All and delete their name >from the To: line. Except I always get two copies of every message in this way -- one from the sender and one from the list :) Aaron Craig Programming iSoftitler.com

Re: [META] Rants (was:Re: space)

2001-06-11 Thread Aaron Craig
wanted to do it, I'd do Reply To All and delete their name >from the To: line. Good move -- I hadn't tried reply to all. Aaron Craig Programming iSoftitler.com

RE: the ENV command? parameter?

2001-06-08 Thread Aaron Craig
array would die outside of the foreach loop anyway -- if you're using strict, which you should be :) Aaron Craig Programming iSoftitler.com

Re: [META] Rants (was:Re: space)

2001-06-08 Thread Aaron Craig
sponse is meant for the list as a whole, I think the labor of changing the recipient should go to the few times you want to respond to one person. Am I the only one that replies mostly to the list? Aaron Craig Programming iSoftitler.com

RE: the ENV command? parameter?

2001-06-08 Thread Aaron Craig
.. } or foreach my $key (keys %ENV) { print "$key: $ENV{$key}"; } or, my favorite print "$_ => $ENV{$_}\n" foreach keys %ENV; Aaron Craig Programming iSoftitler.com

Re: Pop-up window

2001-06-08 Thread Aaron Craig
>To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax, >all in one place - sign up today at http://www.zdnetonebox.com Aaron Craig Programming iSoftitler.com

Re: How to delete an element in array?

2001-05-30 Thread Aaron Craig
At 11:12 29.05.2001 -0700, you wrote: >Uh, careful. This got added to 5.6.1 to support pseudo-hashes and is >probably coming back out when pseudo-hashes get removed in 5.10. >("Death to pseudo-hashes!") pseudo-hash? Aaron Craig Programming iSoftitler.com

Re: run perl in Win 2000 ?

2001-05-29 Thread Aaron Craig
I have to do something like #! perl -I./lib I end up using #! perl out of habit, even if I don't end up using switches. Aaron Craig Programming iSoftitler.com

Re: run perl in Win 2000 ?

2001-05-29 Thread Aaron Craig
ion, say .pl, and then create a >file association from .pl to the perl interpreter. Actually, all my perl extensions (.pl, .pm, .cgi) are associated with my text editor -- to make them run, perl has to be set in the path. Aaron Craig Programming iSoftitler.com

Interesting? regexp

2001-05-24 Thread Aaron Craig
d and backward checking, and messed around with it some, but either that's not what I need, or I haven't completely grasped the concept yet. Any ideas? Aaron Craig Programming iSoftitler.com

Re: Return values from Module

2001-05-24 Thread Aaron Craig
ed in >a scalar context , EXPR is also evaluated in a scalar context. If the >subroutine was invoked in a list context then EXPR is also evaluated in a >listcontext and can return a list value." > >I'm guessing that this is the problem but have no idea what it means... > >Any help would be appreciated. > >Thanks > > >john Aaron Craig Programming iSoftitler.com

Re: Require

2001-05-24 Thread Aaron Craig
ted stuff allows you to avoid future pitfalls because you've done things the safe way, without yet knowing why you did it that way. Since I do this stuff for a living, most of the time the important thing is to get the project working -- figuring out how I got it to work is done on Saturday over a cold beer :) Aaron Craig Programming iSoftitler.com

Re: Require

2001-05-23 Thread Aaron Craig
33 23.05.2001 +1000, you wrote: >Hello All, > >I am new to Perl and putting together a script that needs about 20 reasonably >complex subroutines. > >To keep the code as modular and managable as possible I would prefer not to >define all the routines in the main script. >

Re:[OT]function prototyping (was: copying an array)

2001-05-23 Thread Aaron Craig
at way they've already been thoroughly parsed before ever >being called. I used to do that in my C code, too. I did that too, but I got annoyed at having to remember to change the prototype at the top of the script whenever I changed my sub down below. Aaron Craig Programming iSoftitler.com

RE: Multiple submit buttons CGI question

2001-05-22 Thread Aaron Craig
just set's up what the button text is, not a unique >identifier for the button, so like tdk wrote, you need a name attribute to >get the behavior you want. Aaron Craig Programming iSoftitler.com

Re: Dynamic regular expressions

2001-05-22 Thread Aaron Craig
1]) >{ > print "$ARGV[0] matches $ARGV[1]\n"; >} >else >{ > print "$ARGV[0] does not match $ARGV[1]\n"; >} Aaron Craig Programming iSoftitler.com

Re: Win32::API

2001-05-22 Thread Aaron Craig
gt;function with Win32::API module? > >Any sample code? > >Thanks in Advance, > > >H3li0 > > >______ >Do You Yahoo!? >Yahoo! Auctions - buy the things you want at great prices >http://auctions.yahoo.com/ Aaron Craig Programming iSoftitler.com

Re: use lib directive

2001-05-22 Thread Aaron Craig
andard directories are >printed as is the new one I've specified. I've also tried putting the >directory into @INC using push, but I get the same error message. > >I am using Perl 5.00501 on SunOS 5.6. > >Thanks! > > >Peter Cline >Inet Developer >New York Times Digital > Aaron Craig Programming iSoftitler.com

Re: Beginner question

2001-05-22 Thread Aaron Craig
don't have to worry about whether or not Perl is turning a number into a letter for you, or vice-versa. Call it my C++ influence, but I find mixing numbers and strings in the same variable a rather risky business. Aaron Craig Programming iSoftitler.com

Re: regarding pragmas

2001-05-21 Thread Aaron Craig
ur Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > Aaron Craig Programming iSoftitler.com

Re: copying an array

2001-05-21 Thread Aaron Craig
yping for its debugging and safety net behavior. It kindly catches erroneous parameter passing. Aaron Craig Programming iSoftitler.com

Re: GIF error

2001-05-20 Thread Aaron Craig
change STDOUT in any way? They may be redirecting your gif to the log file. Aaron Craig Programming iSoftitler.com

Re: GIF error

2001-05-20 Thread Aaron Craig
e gifs, but the ouput from this script is >ending up in apache's script_log while the boilerplate goes to the >browser. Aaron Craig Programming iSoftitler.com

Re: GIF error

2001-05-19 Thread Aaron Craig
oin("\\\&", @query); >#print $comline; ># generate the chart by calling 'gifChart' >system("./gifChart $comline"); I notice that you don't send anything back to the browser. I don't know what your gifChart program does. Have you tried setting some variable to the output that you get from gifChart and then sending that back to the browser? Aaron Craig Programming iSoftitler.com

Re: GIF error

2001-05-19 Thread Aaron Craig
older in the browser?! > >Any clues? > > --jab > >= >John Bollinger, CFA, CMT >www.BollingerBands.com > >__ >Do You Yahoo!? >Yahoo! Auctions - buy the things you want at great prices >http://auctions.yahoo.com/ Aaron Craig Programming iSoftitler.com

Re: copying an array

2001-05-19 Thread Aaron Craig
: for loops. Is there an easier way as this may tag my >: cpu due to the huge numbers I am using. > >@copyOfArray = @array; > >is the usual way to copy arrays. Question., though: Is it absolutely >necessary to copy the arrays for what you're doing? If they're large, >thi

Re: Testing Perl CGI scripts under Windows 98 & Personal Web Server

2001-05-18 Thread Aaron Craig
_ >Kristopher Cook (mailto:\\[EMAIL PROTECTED]) >e-Commerce Director >Galyan's Trading Company >(317) 532-0200 x239 >(317) 532-0258 (fax) Aaron Craig Programming iSoftitler.com

Re: Help - Rookie question on Arrays

2001-05-18 Thread Aaron Craig
gt; >Your example is wonderfully concise -- is there any way that you can >expand on this to get more information out of the test, ie which member of >the array matches, or returning the member if this were in a function? > >At 13:16 17.05.2001 -0700, you wrote: >>$TEST1 = "030"; >>@HOLDER = ("020", "040", "034", "056", "030"); >> >> > I need to find out if "030" is present in the array HOLDER >> >>print "gotit\n" if grep /^$TEST1$/, @HOLDER; > >Aaron Craig >Programming >iSoftitler.com > Aaron Craig Programming iSoftitler.com

Re: elegant REGEX

2001-05-18 Thread Aaron Craig
o catch the numbers in the following >input line: >test case total : 32456 allocated : 12000 from tech > >I want to catch the two numbers and insert them to vars >thx. Aaron Craig Programming iSoftitler.com

Re: Help - Rookie question on Arrays

2001-05-18 Thread Aaron Craig
in a function? At 13:16 17.05.2001 -0700, you wrote: >$TEST1 = "030"; >@HOLDER = ("020", "040", "034", "056", "030"); > > > I need to find out if "030" is present in the array HOLDER > >print "gotit\n" if grep /^$TEST1$/, @HOLDER; Aaron Craig Programming iSoftitler.com