> Sorry for the bonehead question, but I have a hash called %p_mod. I
> want to make a copy of it and edit the copy so that %p_mod stays the same.
>
> Currently, I'm creating %p_mod, writing
>
> %custom = %p_mod;
>
> to make a copy of %p_mod in %custom and then doing a bunch of stuff to
> %c
>
> Yes, I have already checked the CPAN but I haven't found yet what I am
> looking for.
> Do you have to write my own script from scratch to convert plain text
> files into XML files?
Your question makes no sense. XML matching what doctype? What kind
of plain text?
--
To unsubscribe, e-
Reading the fine manual will usually say if something inherits from
something else. Failing that an examination of the source will
elucidate.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roug
eq. and comp.lang.c faq
question 11.33
Short answer: In C, Don't Do That. By extension, don't do it in Perl.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components:
and post increment.
>
So, I guess you have a much BETTER lesson to teach: Multiple
assigments to a variable between sequence-points (to borrow from C
terminology) can result in bizarre behavior and should be avoided.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
n the sense that it's
> documented
> to be broken.
>
> Rob
No, it is not "clear" what the language "should" be doing.
*EXACTLY AS IN C* multiple assignments within an expression is
UNDEFINED behavior.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
ut your program will fail (possibly
spectacularly) on a java file that does not follow that rule.
[1] More accurately, to the lexer and parser components of the
compiler -- you can safely skip code generation.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence S
a for loop.
You can get away with the following, so long as @$servref has no
undefined elements.
while ( my $server = shift @$servref ) {
.
.
.
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists o
> Hi,
>
> I'm trying to compile GD-2.35 CPAN module, but i get this error:
>
> "make: *** [GD.o] Error 1"
>
> Nothing else.
> I've tried lower versions, but still get trhe same error.
>
> I'm running RHEL 2.1with PERL 5.6.1
>
> Any help would be appreciated.
>
>
Before installing the GD Perl
,
unwise, or evil. Until such time as they support it, when it suddenly
becomes integral, intelligent and obviously correct. A couple of
years ago, I was having an animated discussion with someone as to why
my current employer used Pg instead of MySQL, and he said, "Well - we
have [that
re.com/ and get a recent gcc for your
platform and while you're there pick up .. well, just about everything
else :) It's all in pkgadd format, and you should be able to spend
about one day getting all the software you'd ever want on your
machine installed without breaking a sweat.
-
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] says...
> > There should be a version of make in /usr/ccs/bin
>
> Giggidy! You're right! Thanks.
>
> > > I'm guessing I entered the wrong site name for the Perl CPAN module
> > > config. Can anyone help me?
> >
> > Well, here's your Dolla
#!/usr/bin/perl
use strict;
use warnings;
my %monthmap = ( JAN => '01', FEB => '02', MAR => '03', APR => '04',
MAY => '05', JUN => '06', JUL => '07', AUG => '08',
SEP => '09', OCT => '10', NOV => '11', DEC => '12' );
my %reversemap = reverse %monthmap;
my @sor
> I hope this is an easy one (I have a feeling it is).
>
> I'm trying to parse through a single, large firewall log file. I need
> to run through a file to get the firewall name and push the associated
> data to it's own log file. This is what I have so far:
>
>
> #!/usr/bin/perl
>
> use warn
> Ok, so now Lawrence would you be so kind as to give a little explanation as
> to what is going on here?
>
> I can see that it works but to be honnest after the line: "my @sorted = " I
> am lost...
>
> Thanks in advance,
>
> Rob Coops
>
>
Okay ...
>
> Hi,
>
HI! And THANKS A LOT for posting your login/password pair -- I am
sure many readers will have uploaded messages for your edification.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software
Absolutely not.
> -Original Message-
> From: the cut throat party (for self defense)
> [mailto:[EMAIL PROTECTED]]
> Sent: 15 April 2001 4:35
> To: [EMAIL PROTECTED]
> Subject: hi?
>
>
>
> new to the list... anyone alive?
>
> Jim S.
>
> "getting drunk by yourself is not sick...
>
Actually that's a good question which I should look in to myself too.
Especially seeing as I'm self taught .. (goes to check out the url you
gave)...
What type CGI are you going to be writing?
> -Original Message-
> From: Ray Calkins 100660207 [mailto:[EMAIL PROTECTED]]
> Sent: 16 April
Thought I'd have a go at securing one of my scripts after Ray's question
about security. When using "strict", I am told the following:
Scalar value @views_keys[$k] better written as $views_keys[$k] at
./newremote2.pl line 327.
Scalar value @_[0] better written as $_[0] at ./newremote2.pl line 342
Peter,
You should have no problems executing binaries using the system()
function,.. but if you're having problems with shell commands like "dir"
etc, you should try something like:
system("c:\winnt\system32\cmd.exe /c dir c:\mydir");
Alternatively there are modules available which will more th
"copy /b" in windows is a binary copy
eg. copy /b file1 + file2 file3
or
"type"
type file1 >> file2
maybe?
what exactly are you trying to acomplish? I'm not at all sure you'll be able
to combine .pst files outside of the application which built them
> -Original Message-
> From: Dr
Woah! Perl has a getc() function?!! /me goes to look it up! :) Schwing!
> -Original Message-
> From: Sean O'Leary [mailto:[EMAIL PROTECTED]]
> Sent: 24 April 2001 10:16
> To: [EMAIL PROTECTED]
> Subject: Re: sysread and buffering
>
...
>
> But all that's moot, considering that Perl has ge
Can anybody suggest the most efficient method to do the following...
I have an array of email aliases like the following:
[EMAIL PROTECTED]: sys
[EMAIL PROTECTED]: coookiecom
[EMAIL PROTECTED]: niccicamcom
[EMAIL PROTECTED]: katyland-
Never seen system with that syntax before... here's what I'd do though:
if (-e $file) {
if (unlink $file) { warn "File $file WAS removed."; }
}
That's just my first guess though having not tested it. :)
> -Original Message-
> From: Peter Lemus [mailto:[EMAIL PROTECTED]]
> Sent:
How about this?
if (/PT\s*\(?(\w+)\)?/) {
$value = $1;
}
PTMatches the PT
\s* Matches any number (or no) spaces
\(? Matches one or none ('s
(\w+) Matches one or many word characters
\)? Matches one or none )'s
$1Value caught by (\w+)
I think. .. .. maybe.
> At 05:13 PM 5/10/20
Oooo... I like that... more or less the same as Peter suggested but a little
more self contained ... gonna have to remember that kinda structure.
thnx i'll try it out :)
> -Original Message-
> From: Paul [mailto:[EMAIL PROTECTED]]
> Sent: 10 May 2001 10:41
> To: Nic LA
Ignore me if i'm talking poo, (especially since I didn't see the original
message),... but surely splice() would be best suited for working with an
ARRAY, but you all seem to be talking about hashes... sooo
- Original Message -
From: "Brett W. McCoy" <[EMAIL PROTECTED]>
To: "Walt Ma
Is it possible to pass hashes between subroutines? When I try stuff like
&foo(%bar); or return %bar; it doesn't seem to work how I would expect.
:-/
Nic LAWRENCE <[EMAIL PROTECTED]> Technical Director
TFBnet Internet Services http://www.niclawrence.co.uk
eFax US: +1 (253)295
Hi all,
I'm trying to write a program to join up subdocuments into one full
document. (all are RTFs)
Is this more of a VB script stuff or can it be done with PERL?
Thanks.
Lawrence
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I would like to match the following text (of different lines but standrad
text) using regex.
How can I do that?
Status of this document
This document is from an electronic database of legislation
maintained by the Parliamentary Counsels Office of Western Australia.
Disclaimer
(a)no warr
On Sep 28, 2009, at 11:01 AM, Ruprecht Helms wrote:
Hi,
How have I to write the sql-statement if I want to use variables
like this:
Don't.http://xkcd.com/327/
The value of the variable can have the value of another recordsetloop
or a value come from outsite the script.
Regards,
On Mar 29, 2010, at 10:54 AM, r...@i.frys.com wrote:
I looked through perlop and was unable to find where it
stated that the ternary operator should only be used in an
assignment such as you've shown. Can you point out where
that's located.
In my reasonably-arrogant opinion: That's kind of
sanket vaidya wrote:
>Whereas the output on perl 5.6.1 is
>
>Hello!!1
Ummm, beg to differ
#!/usr/bin/perl
use strict;
use warnings;
sub hello;
my $ref = \&hello;
&{$ref};
sub hello {
print "hello!!";
}
[EMAIL PROTECTED]:~$ perl -l pbml.pl
hello!!
[EMAIL PROTECTED]:~$ perl -v
This is
If you're using Gnu diff (i.e. the diff that comes with most Linuces)
--speed-large-files might help you, without having to jump through a
perl hoop.
--L
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
> I am using a module having documentation saying document() is a
> method. However, I see it used as
>
> $o->document;
>
> Can you reference a method in this way? (I takes no args). I always
> thought
>
> $o->document() and $o->document meant different things, function
> verses attribute.
>
> This distinction between canonical existence and logical existence--or
> perhaps more properly the distinction between the existence of an
> element and of a position--is important because, while useful, the
> distinction does have implications for the value of $#array, the
> return value of scal
>
> I was just trying to match a string and save it in a single statement
> as follows:
>
> $extracted = "cp xyz";
> $state_var = $extracted =~ m/cp\s+(.*)/;
> print "$state_var $1 \n";
>
> The output is: 1 xyz
>
> So the assignment to $state_var does not work. Is this an incorrect way.
>
The
On Tue, 30 Nov 2004 23:33:39 +, Jonathan Paton <[EMAIL PROTECTED]> wrote:
> Dave,
>
> Yes, look up references in your books.
>
> E.g.
>
> sub example {
> my @data = qw;
> return [EMAIL PROTECTED];
> }
>
> my $reference = example();
>
> for my $word (@{ $reference }) {
> print "
hold my family
my $people = [];
$person->{hair} = 'blond';
$person->{name} = 'Lawrence';
$people->[0] = $person;
Of late, I have gotten out of the habit of explicitly initializing
lists or hashes, but I can see doing that piece of extraneous code to
reinforce in th
> > Sure...if I know someone can do the job. I'll just go to rentacoder.com
>
> I'd be more than happy to consult for your Perl needs, send me an email
> off list if you're interested.
>
> >>If not, "steal it from the market" might be more apt.
> >
> >
> > So you don't take examples you find o
>
> Got it so far.
>
> open CHECKFILE, "< file.in" or die qq(Cannot open file "file.in": $!);
> @filecontent = ;
> foreach $line (@filecontent) {
> print " $line";
> }
> close (INFILE);
>
>
> The input file (list of files) looks something like this:
>
> P: 1
::Magick provides a Perl implementation that will call
ghostscript for you.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions.
$phrase = 'Anna would like a banana';
my ($greedy) = $phrase =~ /(.*)na/;
my ($nongreedy) = $phrase =~ /(.*?)na/;
print "Greedy: $greedy \nNongreedy: $nongreedy \n";
produces the output
Greedy: Anna would like a bana
Nongreedy: An
-- -- -- -- -- -- -- -- -- -- -- -
ords (and THAT , class, is why embedded blanks in hash keys for
positional parameters is a Bad Idea - because you can't use qw//)
So, if instead of two parameters I had to pass a handful of
parameters:
some_graphic_function ( @opt{ qw / x_position y_position
radius line_style color depth /
> Casey West wrote:
> > It was Wednesday, December 01, 2004 when Gunnar Hjalmarsson took the
> > soap box, saying:
> >> Casey West wrote:
> >>> The original question was places squarely within reasonable query
> >>> boundaries.
> >>
> >> What do you refer to as "the original question"? To me it's
on is
required or warranted.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
set binary mode.
$ftp->binary || die "Could not set binary mode", $ftp->message;
warn "Bin mode set ... " ;
#
# Now we are ready to get the file we want
#
$ftp->get('random_file.jpg') || die "Get failed ", $ftp->message;
warn "Get c
rs later.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail
>
> Is it something like:
>
[snippage snipped]
>
> TIA!
>
>
> Regards,
>
Not a hash reference, a hash ...
sub method
{
my ($class, %opt) = @_ ;
.
.
.
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL
*IS* much faster, but
always leaves me with the feeling that it's overly obfuscated.
(Although maybe if I forced myself to use it more often I'd be more
comfortable with it... )
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/a
n empty string if there is no cookie
$ID = $newcook{usrID}->value if ref($newcook{usrID});
# if there is no cookie, $ID will be untouched (maybe undef?)
$ID = ( ref($newcook{usrID} ? $newcook{usrID}->value : 'no cookie set yet' );
# $ID will get *SOME* value you can change
k and friends, or even taking the
bigger step and start throwing exceptions.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
I bring this up: You're going to spend
a lot of effort to debug your cookie problem, perhaps to find later
that some large segement of your population doesn't permit cookies).
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s
*
another corner of Perl to explore, even if you've been living there
for a long time.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal propo
he line
if ( my ($key, $value) = /(.*): (.*)$/) {
warn "Got $value for $key";
push @{$data{$key}}, $value;
}
}
warn Dumper \%data;
__DATA__
key1: data1a
key2: data2a
key3: data3a
key1: data1b
key2: data2b
key3: data3b
.END PERL PROGRAM ..
e) ", sprintf("%o",
$mode),"\n" ;
... END PERL PROGRAM ...
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components:
> Lawrence,
>
> Thanks for your explanation and pointers to perldoc, I can now manage
> it basically.
>
> To print them out, now I use
>
> for ($i=0; $i<=$max_records; $i++) {
>foreach $key (@keys) {
> print $data{$key}[$i];
>
a previous
read or write operation, the OS may post an error when you attempt to
close. Another possibility (although far-fetched): What if the
filesystem goes away while you had it open?
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTEC
.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail: [EMAIL PROTECTED
print STDOUT (@list1), (@list2); # works again
}
.. END PERL PROGRAM .....
And upon running, we get:
lawrence /tmp > perl test.pl
print (...) interpreted as function at test.pl line 15.
Useless use of private array in void context at test.pl line 15.
Red
Why don't you try trimming everything out except the block that
encloses line 382 and post that.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zero
ter:\n";
for (@word) {
print "$_\n" if /this|that/;
}
__END__
Produces the output:
lawrence /tmp > ./test.pl
Wrong wronger, wrongest:
this
that
thit
thas
Better:
this
that
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
($var)) {
> print "your variable is a number $var\n";
> } else {
> print "number $var is not a number\n";
> }
1) Read perldoc Net::IPv4Addr
2) change ipv4_checkip to ipv4_chkip
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
use) or (b) explicitly
pass it to make.
make CC=/opt/bin/gcc
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To uns
"
My gut (and many years of experience) tells me "putting a big fat
database select in the middle of your route selection code is going to
be a performance pig". Caching, caching, caching.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence
Aww, dangit --- I should have not used __TARGET__ as the replacement
tag -- there is just too much room for confusion with reserved words
like __PACKAGE__ or __LINE__ ... Everyone take out your erasers and
change that to --TARGET-- please :)
--L
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
fruit => 'citrus' );
@{$secure{USER_GROUPS}} = ( 10, 20, 30 );
warn Dumper \%secure;
my $query = new CGI;
my $cookie = $query->cookie (-name => 'cookie',
-value => \%secure );
warn Dumper $cookie;
warn $cookie->as_string;
demand
for open-source source-closing software.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail: [EMAIL PRO
again.
Footnotes:
[1] I actually think cookie paranoia is misplaced, and would love to
see users educated -- but The Client Is Always Right, and if they say
"Our industry demands no cookies" then so be it. There are other ways
of keeping state, use them when you must.
-- -- -- --
ld thinks pearl is something that grows inside an
oyster and just want to have a dot-exe file they can download and run.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two component
n"
if $log{$key}{user_type} eq 'robot';
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
s
192.168.1.1' => { user_agent => '...GoogleBot...',
user_type => 'robot' },
'192.168.1.3' => { user_agent => '...Linux...Firefox...',
user_type => 'human' },
user_agent => '...Browser X...' },
{ user_type => 'human',
user_agent => '...Browser Y...' } ] );
How do you think you'd create that and iterate across
is a bad idea.
One of the unspeakable horrors that was thrust upon me in my current
job, was a chunk of 7,467 lines of code that is one enormous
if/elsif/elsif/elsif/elsif/ block. Now it is 287 subs and a %dispatch
table.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
rom_ is either your match or undef
Which just allows you to defer the test for undef until later.
print "I saw an email address $from_\n" if defined($from_);
I just wrote about this a mere two weeks ago in this very forum.
http://www.nntp.perl.org/group/perl.beginners/70671
-- -- -- --
6:20: ocidfn.h: No such file or directory
Well -- find those files... maybe your sysadmin installed Oracle's
libraries in some non-standard place
find / -name oci.h
Then, fixup the incdir path, and try again.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence S
ut without ill
effect) that allows me to SUPPRESS that automatic check is a GOOD
thing. But requiring me to know that my $DISPLAY is set but
unreachable is a stone in my shoe.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
C
) );
if ( my $cursor = $sth->execute ) {
while (my $row = $sth->fetchrow_hashref) {
.
.
.
}
}
Of course, this just trades the KNOWN quantity of "straightforward
memory for time" for a relatively unknown tradeoff on the database
server.
-- -- -- -- -- -- --
;
Class methods have uppercase forms: Employee->Create();
Functions/methods that return a list have plural noun forms:
$division->Employees; $person->email_addresses.
Well -- enough philosophy for one day ...
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
ed `X'\n";
}
... END PERL PROGRAM ...
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is t
rence (@preference) {
print $preference->{language},"\n";
}
--- end perl code ---
Plugging this into a CGI and doing something useful with it is, as
they say, left as an exercise to the reader.
-- -- -- -- -- -- -- -- -- --
er message I didn't find in
> perldiag.
>
You have a few TOO many 'my's ... your problem is all revolving around scoping.
In the sort snippet you say my @newgroup = (@oddgroup, @evengroup) and
then in the very next line destroy @newgroup by closing the block.
Using lexi
rogram does nothing useful";
--
... put it into your crontab and see what happens.
Reading the man page for your system's cron will also be enlightening.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software
a single
.EXE file they can just run, without having to install Perl.
The comes-with perlcc will function for those cases where "I just want
to save myself the support hassle of casual users tweaking the
script."
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
L
ut its consistently faster by an average 6-10%
>
> Any ideas why that might be?
Well, first -- you're creating the hash inside the benchmark loop,
which is not particularly light-weight.
Second: You're using pathologically small lists. Try running it with
10,000 elements
ash version was about 10 times faster
for *JUST THE SELECTION OPERATION* than the grep-the-list version.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them
-long and randomly-variable amount of
time (printing) inside the function you are trying to test, you are
basically destroying the exact number you are trying to compute, and
have merely computed the deviation of the print operator.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
sort keys %capdef ) {
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
> Hi,
> can anybody address me to online resources to learn how to connect to a
> PostgreSQL DB server through a Perl script?
> Code examples are welcome ;-)
> TIA
>
- begin perl code ---
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
our $_db
t;
> Thnx in advance
Yes. The cause of this is the script headers are ending prematurely.
If you would rather have *USEFUL* answers to stupid questions,
including some code to elicit the error would be reccomended.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
ere who
configure their browsers to either not issue referrer at all, or
tomangle it in an effort to obfuscate their activities.
My instinct tells me: If the CGI::referrer() call is not giving you
what you want, then it's unlikely that the browser is correctly
passing in the header.
-- -- -- -- --
ne record because it has the "0" value.
> How could I pass this situation?
>
while ( defined ( my ($pid) = $sth->fetchrow_array ) ) {
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software c
series of data
indexed by a monotonically increasing integer. The List.
my @keyword = split ( /\//, 'something/wicked/this/way/comes' ) ;
If you like the refence version of it
my $keywords = [ split (/\//, 'something/wicked/this/way/comes') ] ;
-- -- -- -- -- -- -- -- -- -- --
' ) ;
foreach my $directory (@directory)
{
print "before: $directory\n";
$directory .= '\\'
unless $directory =~ m/\\$/;
print " after: $directory\n\n";
}
== end code
Produces the following output
lawr
y listen on a given
address.
Getting the IP-addresses for the various interfaces on your system is
left as an exercise to the user.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two comp
5.456')))
|| die "bind: $!";
between the calls to socket() and connect().
Obviously you'll need to replace that bogus IP-addr with the ip-addr
of your local interface.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s
ides a helper function
POST that will generate a properly formated HTTP::Request object.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into th
) would give me
> better mileage.
>
I use PDF::API2 every day and love it.
The documentation is horribly lacking (Track down the example files -
that is the best doco there is), but the library can do it all.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
amp;& $value eq 'spring' ) {
print "Flowers are in bloom\n";
} else {
print "No flowers here!\n";
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal
dsheet::WriteExcel
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail
1 - 100 of 205 matches
Mail list logo