Hey, that's what we call FAQ, isn't it? :-)
Is there any FAQ for this mailing list?
Thx
Joel
-Message d'origine-
De : Vladimir Lemberg [mailto:[EMAIL PROTECTED]
Envoye : mercredi 26 janvier 2005 01:08
A : Perl Beginners
Objet : search engine for beginners.perl.org
Hi,
Is there any
Andrianoelison Joël [AJ], on Tuesday, January 25, 2005 at 18:59
(+0100) has on mind:
AJ my %myhash; # you'd better declare it outside the while(ALIASES)
I always initalize hashes and arrays like this:
my %myhash = ();
--
...m8s, cu l8r, Brano.
[I feel alephed out]
--
To unsubscribe,
Andrianoelison Joel [AJ], on Wednesday, January 26, 2005 at 10:03
(+0100) thoughtfully wrote the following:
AJ Is there any FAQ for this mailing list?
yes, you have that in _every_ mail, you get from this list. Just show
all email headers you get. Also, you can find there:
List-Help:
JupiterHost.Net ha scritto:
In benchmarking some code I've come across something I did not expect:
slice:
use strict;
use warnings;
my @k=qw(1 2 3 4 5 6);
my %n;@[EMAIL PROTECTED] = @k;
print hi if exists $n{1};
print hi if exists $n{3};
print hi if exists $n{5};
print hi if exists $n{7};
print hi
I have this array and I am trying to figure out how to read $id in it. Any
ideas?
@history = (
{
program = 'racer',
version = '0.45',
input = {
'/home/' = undef,
},
input_contents = '
$name= \'Jerry\';
$id = \'035\';
1;
',
perl = {
Jerry Preston [JP], on Wednesday, January 26, 2005 at 06:27 (-0600)
contributed this to our collective wisdom:
JP @history = (
JP {
JP program = 'racer',
thats Array of Hashes, so just pust that in google, and you will see.
I did so, and found this:
Subject: How to read this array?
I have this array and I am trying to figure out how to read $id in it. Any
ideas?
@history = (
{
program = 'racer',
version = '0.45',
input = {
'/home/' = undef,
},
input_contents = '
$name= \'Jerry\';
$id =
The slice version took about 10 seconds, the grep one took more than 1
minute.
Marcello
Thanks Marcello!
Your example, John's. and renards have been very helpful to help see the
point someone else was trying to make about watching what you include in
your benchmark.
I appreciate your time :)
renard wrote:
BE AWARE THAT THE BENCHMARK PROVIDES INCORRECT RESULTS.
Thnaks, I was aware of that, but still wanted a general idea :)
The tested code is within an anonymous subroutine while this does
executes, the results differ dramitcally from the results when the
tested code is enclosed
my($val)=$history[0]-{'input_contents'} =~ m/\$id\s*=\s*\'([^']*)\'\;/ ;
print $val ;
Manav
|-Original Message-
|From: Jerry Preston [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, January 26, 2005 5:58 PM
|To: 'Perl Beginners'
|Subject: How to read this array?
|
|
|I have this array and I
Jerry Preston ha scritto:
I have this array and I am trying to figure out how to read $id in it. Any
ideas?
@history = (
{
program = 'racer',
version = '0.45',
input = {
'/home/' = undef,
},
input_contents = '
$name= \'Jerry\';
$id = \'035\';
Ken Gillett ha scritto:
Information about these has proved hard to come by, but having
ascertained what I need to use I find another problem. I want to
calculate the flags to use beforehand, but if I try
tie %$dbm, DB_File, $dbf, $dbflags, $mode, $DB_HASH;
even though $dbflags contains
Hi beginners@perl.org,
how can I convert some text from windows-1250 codepage to ASCII ?
I tried:
use Text::Iconv;
$c = Text::Iconv-new(WINDOWS-1250, ASCII);
print $cted = $c-convert(áè¸);
but returns nothing, I awaint aez, I am running AS perl on Win.
anyone ?
--
--. ,-- ,- ICQ:
On Wed, 26 Jan 2005, Ing. Branislav Gerzo wrote:
thats Array of Hashes, so just pust that in google, and you will see.
I did so, and found this:
http://${host name deleted}/orelly/perl/prog3/ch09_03.htm
That looks like a pirated copy of one of O'Reilly's bookshelf CDs.
This is, in a real
That looks like a pirated copy of one of O'Reilly's bookshelf CDs.
Thank you for pointing this out. I have been an O'Reilly customer
on all things Unix and Perl and was shocked to see the online collection.
In fact when I visited the site, I was greeted by a pop up banner in what
looked like
Dear all,
I am trying my mod_perl in my Apache webserver for the first time (under
Mdk-Linux).
I have created a simple print hello world script with the name 'hello.pl'
and I stored it under 'var/www/cgi-bin/' but whenever I try to open
the script with http://localhost/cgi-bin/hello.pl
It gives
Charles K. Clarkson mailto:[EMAIL PROTECTED] wrote:
Repost your script to the previous web link and I'll take
another look on Thursday.
I will do that. In the meantime, I've implimented many
of the suggestions everyone has given me, but I'm a bit
stumped on this:
I have the function:
sub
Jason Balicki wrote:
Charles K. Clarkson mailto:[EMAIL PROTECTED] wrote:
Repost your script to the previous web link and I'll take
another look on Thursday.
I will do that. In the meantime, I've implimented many
of the suggestions everyone has given me, but I'm a bit
stumped on this:
I have
Hi,
The information not sufficient. You need to tell Apache that your
scripts have the extension .pl. I hope you are doing that.
Then you need to tell Apache to use a PerlHandler to process the
scripts otherwise Apache will not process it and I think you haven't do
this is your httpd.conf. Again
On Wed, 26 Jan 2005 16:21:42 +0100, Ing. Branislav Gerzo [EMAIL PROTECTED]
wrote:
Hi beginners@perl.org,
how can I convert some text from windows-1250 codepage to ASCII ?
I tried:
use Text::Iconv;
$c = Text::Iconv-new(WINDOWS-1250, ASCII);
print $cted = $c-convert();
but returns
Wild Technology Pty Ltd , ABN 98 091 470 692 Sales - Ground
[...]
And that'll really make you popular around here ;-)
Yes, I've noticed. Unfortunately if I leave off my .sig (as I did in the
original message of this thread), the mail server decides to append an even
longer signature to my
Dear all,
Is it possible for me to write a perl cgi script that will echo the output
from an rsync backup?
Thanks.
--
Just getting into the best language ever...
Fancy a [EMAIL PROTECTED] or something
on http://www.perl.me.uk Just ask!!!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Can anyone provide an online reference to information on the below?
Thanks...
Regards,
Michael S. E. Kraus (hoping not to get flamed about his .sig)
B. Info. Tech. (CQU), Dip. Business (Computing)
Software Developer
Wild Technology Pty Ltd
___
ABN 98 091 470 692
Gavin Henry wrote:
Dear all,
Hello,
Is it possible for me to write a perl cgi script that will echo the output
from an rsync backup?
Sure, why not :)
Sorry, had to be done ;p
More info needed, code you've tried, how you're doing rsync, etc
Start with:
#!/usr/bin/perl
use strict;
use warnings;
Is it possible for me to write a perl cgi script that will echo the
output from an rsync backup?
Sure, why not :)
Sorry, had to be done ;p
More info needed, code you've tried, how you're doing rsync, etc
Start with:
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
print CGI::header();
print
I need to find the index of a particular element in array.
For eg.,
@arr = ('abc', 'xyz', 'mno','pqr','stu','sdfd');
I want to find the index of the element 'pqr' which is 4.
Any function/code to achieve this.
Thanks in advance,
Mallik.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hi Mallik
You can use regular expression
-
$i=0;
foreach $temp (@arr)
{
if ( $temp eq 'pqr' )
{
print index is == $i \n;
last;
}
$i++;
}
-
I hope this will work ,but ur desired index is 3 not 4.
Mallik ..
Deserve before
-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED]
Sent: Thu 1/27/2005 12:56 PM
To: Perl-Trolls
Cc: beginners@perl.org
Subject:How to find the Index of an element in array?
I need to find the index of a particular element in array.
For eg.,
@arr = ('abc',
Hi,
Thanks for ur reply.
Is there any function instead of looping thru entire array.
Mallik.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 1:06 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: beginners@perl.org
Subject: RE: How
29 matches
Mail list logo