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
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
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
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
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,
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
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
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
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
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
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
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
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
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;
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
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
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,
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
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
[...] 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
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
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...
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;
}
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
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
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
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
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
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
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,
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
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]
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
33 matches
Mail list logo