RE: guessing script

2004-04-15 Thread Guay Jean-Sébastien
Hello Greg, Thanks for you comments. Is this the best way then? Seems to work, but I'm curious what could be any better.. Your version is fine. Here's mine, just so you have another take on how to do some things. Among a few other things, I added checking for so that the guess has to be a

RE: Flag for script

2004-04-15 Thread Guay Jean-Sébastien
Hello Jakob, I'm trying to create a script with where you can put a flag to the script or not fx run it like: script -h or just script I would use one of the Getopt::* modules, because parsing command line options is something very standard, and as you add more and more options, the

RE: I don't get it ... array

2004-04-14 Thread Guay Jean-Sébastien
Hello Romain, sub n_list { my($a)[EMAIL PROTECTED]; ...sql query... my $sth=$dbh-prepare($sql); $sth-execute(); my node_l; As others have noted, this should be @node_l, but you say it's that way in your code (why didn't you just paste your code btw? Would have avoided such errors

RE: using strict

2004-04-05 Thread Guay Jean-Sébastien
Hello Joseph, One thing I would request is that you trim off any material to which you are not responding from old posts. This helps keep bandwidth and storage needs down. I'll keep that in mind. I usually don't keep all the thread of replies that Outlook ( grrr) keeps at the bottom, seems

RE: using strict

2004-04-05 Thread Guay Jean-Sébastien
Hello Joseph, David, A stronger argument has to do with mindset. The || operator is an expression evaluation operator, appropriate to mathematical or paramathematical expressions. The context really calls for a flow-control operator, or. Thanks for making my point better than I could,

RE: using strict

2004-04-02 Thread Guay Jean-Sébastien
and getting one line at a time until we get to the end of the file. Hope this helps, Jean-Sébastien -Message d'origine- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Date: 2 avril, 2004 10:12 À: Guay Jean -Sébastien Cc: Perl Beginners Objet: RE: using strict Guay, ooops. that would

RE: using strict

2004-04-02 Thread Guay Jean-Sébastien
Hello Derek, can I email you from know on??? : ) You are so through! Thank you! No, I would prefer that you always reply to the list. First reason is that other beginners can benefit from our exchange (and the mails end up in a searchable archive), second is that if I'm not there (or for

RE: using strict

2004-04-01 Thread Guay Jean-Sébastien
Hello Derek, When using strict, the error message should point you to the line where the error is. It's usually pretty darn good at pointing the right line. In this case, I bet it's this one: while ( defined($line = CRITICALSERVERS) ) { There is no declaration of the $line variable. Try

RE: determing number of records returned with DBI

2004-03-30 Thread Guay Jean-Sébastien
Hello Andrew, Is there a way to find out how many records were returned with a DBI query? There's the obvious counting each record as you fetch it, but I need the count before I start going through them. I was looking through the DBI documentation (perldoc DBI) not long ago and this

RE: determing number of records returned with DBI

2004-03-30 Thread Guay Jean-Sébastien
Hi again Andrew, With the mysql driver, it does return the number of fetched rows before you start iterating through them. It does what I need it to do. Thanks. Ok, but that behaviour is probably specific to DBD::MySQL, and can't be relied upon if you change to another DBD... I would use

RE: Question about cgi forms (slightly OT)

2004-03-25 Thread Guay Jean-Sébastien
Hello, mike wrote: When I do Search in the web-browser, is there any way to get it to search the values in the fileds of the form? Currently all the values show up, but they dont seem to appear to be in scope for searching Show some code -- likely your logic is wrong -- if

RE: Hash Help Needed !

2004-03-25 Thread Guay Jean-Sébastien
Hello Jason, $VAR1 = { 'oids' = '%response_values', 'time' = '03/25/2004 03:16:39' }; ... If so, what is wrong with my assignment statement ? push @{$response_hash{$request_id}},{time = $time,oids = %response_values}; That is exactly what Charles told you in

RE: QUERY_STRING

2004-03-24 Thread Guay Jean-Sébastien
Hello Mike, Do we know where I can get a clear definition of query_string? [and in another message...] Is there any place we can look up the definition of these such as CONTENT_LENGTH query_string. I'm not sure why you're asking here for something like that. You can use Google to get to

RE: references

2004-03-24 Thread Guay Jean-Sébastien
Hello Joe, i have the following code: $sth = $mysql_dbh-prepare(select subroutine_pointer from $database.equipment_manufacturer where manufacturer=\$remedy_eqpt_mfgr\); $sth-execute(); $subroutine_pointer = $sth-fetchrow_array(); no strict refs;

RE: nested while loops using DBI

2004-03-22 Thread Guay Jean-Sébastien
Hello Mike, $row=$dbh-prepare(SELECT contact_id,first_name,last_name,organisation FROM tb_contacts WHERE organisation ILIKE ?); [...] while(($id,$first_name,$last_name,$organisation) = $row-fetchrow_array()) { [...] $row=$dbh-prepare(SELECT id,contact_id,type_of_contact,priority FROM

RE: Some java some perl

2004-03-11 Thread Guay Jean-Sébastien
Hello Joseph, String[] aStr = {-e, 'print(\Ola\n\) foreach (1..100);'}; Process p = r.exec(perl, aStr); You told the system to open the perl compiler here. You may also have Offered it 100 lines like this: Ola Ola Which Perl would have a very hard time

RE: iterating through hash of hash references

2004-03-03 Thread Guay Jean-Sébastien
Hello, It looks like not all of the fields have something in them. Perl is taking blanks for undefined for some reason. An empty field in a database is not a blank, as you say, but a NULL. Meaning it's not just blank, but effectively inexistant - there is no value, not even the empty string,

RE: Could I put commands in a variable

2004-02-20 Thread Guay Jean-Sébastien
On Feb 20, 2004, at 2:02 PM, Joel wrote: Thanks, can you give me some examples of loops like that? Here's one: Nice code James, nicely reusable. Just need to add world file loading and maybe support for items... ;) But then all you have is a world in which you can move. What about actual game

RE: WinXP copy-paste, was RE: A little help please?

2004-02-03 Thread Guay Jean-Sébastien
Not quite. There seems to be at least one extra step. With XP, you have to call up a menu and select 'mark' before selecting. I can't recall at the moment whether you have to do menu selctions to paste at the insertion point. In 2K, you can select text by dragging. If there is text

WinXP copy-paste, was RE: A little help please?

2004-02-02 Thread Guay Jean-Sébastien
[...] inclding copy-and-paste [though the XP version is intentionally more of a pain-in-the-ass than the W2K version, as with almost every professional aspect of the OS]. Err, not really sure what you mean by this. I have found it's precisely the same in WinXP as in Win2k. Care to

RE: Upgrading Perl linux 5.6 rpm to 5.8.2 source

2004-01-14 Thread Guay Jean-Sébastien
This should allow you to do an upgrade rather then remove and upgrade. If it's possible to do that (and have it actually work), does that mean that it's only on Windows (with ActiveState Perl) that Perl 5.6 and 5.8 are not binary compatible for XS modules? If not, I would think that simply

RE: Upgrading Perl linux 5.6 rpm to 5.8.2 source

2004-01-14 Thread Guay Jean-Sébastien
Hello drieux, the upgrade will upgrade and install the XS compatible for 5.8.X version of the code for all of the components that are in the RPM. any additional perl modules that have an XS component will need to be re-built and installed. Exactly, that's what I was wondering about...

RE: Ending a compound statement

2003-12-18 Thread Guay Jean-Sébastien
Hello Kenton, It depends on what you want to do. There is not really a right way, since the two series of statements you mention will lead to different results. (I added numbers to the different parts of your examples, makes them a bit easier to follow) if (expression1) { statement1; }

RE: Beta Testing a Robot

2003-12-04 Thread Guay Jean-Sébastien
I don't quite understand why the first response is sent back to the list rather than just the OP though? Why do you send your responses (answers to questions) to the list instead of to the OP? So that others can benefit, and so that it will be in the list archives when someone else has the same

RE: Beta Testing a Robot

2003-12-04 Thread Guay Jean-Sébastien
and may very quickly become outdated, then the amount of crud someone must wade through if they are one of the few that actually check the archive first has gone up greatly. You've got a good point there. I didn't see it from that point of view, but now that I do, I agree that this is not

RE: PPM3 Activestate Perl (and CPAN on Win32)

2003-11-25 Thread Guay Jean-Sébastien
What rpm repositories does everyone use with ppm? The standard stock seem to be missing a lot of cpan modules. Thanks! Here are a few I know of: http://theoryx5.uwinnipeg.ca/ppms/ -- many CGI/Apache/DBI/GD related modules http://www.roth.net/perl/packages -- mostly Win32 related modules

RE: pagination of dbi results on html browser

2003-11-17 Thread Guay Jean-Sébastien
Hello A L, speaking of toggling checkboxes When I search for this on the web, most of them give javascript results. I would like to use Perl. Is it possible to do this with Perl? Why would you want to do something like that in Perl? When you click a button on a web form, the only time you

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
I agree with your basic solution, but since he will be doing his development in Windows, shouldn't that be 'file system neutral'? hence not using the unix separator / between the directory component and the filename component? In a move to simplify porting of scripts (and save the sanity of

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
It has nothing to do with what ActiveState did or didn't do. The DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the path separator however the operating system itself is able to use '/' as the path separator. Sorry, I just tried it on my machine here (NT4), and doing cd

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
It has nothing to do with what ActiveState did or didn't do. The DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the path separator however the operating system itself is able to use '/' as the path separator. Err, just noticed I shouldn't have read so quick... Still,

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
Which version of Perl from ActiveState did this show up in? Well, seems ActiveState didn't really have to do anything after all, according to John W. Krahn. As far as I remember, it's always been like that in ActiveState Perl. But as I said, I still find it great that they didn't do anything to

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
That's exactly what John said. ;) I realized that 5 seconds after I sent the mail... :-( -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Playing with Numbers

2003-11-10 Thread Guay Jean-Sébastien
my $integer = 432; my $string = sprintf(%05d, $integer); Yay! J-S -Message d'origine- De: SilverFox [mailto:[EMAIL PROTECTED] Date: 10 novembre, 2003 16:14 À: [EMAIL PROTECTED] Objet: Playing with Numbers Hi all, i'm trying to figure out how to test if a number is five digits and if