; a écrit :
> Hi All,
>
> Any good modules or pointers on following topics.
>
> 1) logging - for logging errors.
> 2) exceptions handling.
>
> Thank you,
> --
> Santosh
>
Hi Santosh,
please reply to all recipients.
On Mon, 29 Sep 2014 00:25:09 +0530
Santosh Kumar wrote:
> Hi All,
>
> Any good modules or pointers on following topics.
>
> 1) logging - for logging errors.
> 2) exceptions handling.
>
First of all, see http://perl-begin.org
Hi All,
Any good modules or pointers on following topics.
1) logging - for logging errors.
2) exceptions handling.
Thank you,
--
Santosh
On Thu, Jun 12, 2008 at 10:22 PM, mani kandan <[EMAIL PROTECTED]> wrote:
> Dear gurus
>
> I have to write a program with configuration file *.CFG, i came to know have
> to use pointers
>
> I am new to pointer in perl can i get some tips about pointers in perl, where
>
Dear gurus
I have to write a program with configuration file *.CFG, i came to
know have to use pointers
I am new to pointer in perl can i get some tips about pointers
in perl, where can i get study materials and sample files. Anticipating a
favorable reply
Regards
Manikandan N
it), or as a copy (which you
>> can change all you want and not affect the original).
>
> The terminology I was taught for this was "pass by reference" to denote
> sending around pointers to the same physical memory location, and "pass
> by value" to denote se
d not affect the original).
The terminology I was taught for this was "pass by reference" to denote
sending around pointers to the same physical memory location, and "pass
by value" to denote sending around abstract logical pieces of
information that are typically copies of t
Bryan R Harris wrote:
>
> I remember from my C++ class that when you pass arguments to subroutines you
> can pass them either as a pointer to the real variable (so you modify the
> original if you change it), or as a copy (which you can change all you want
> and not affect the original).
>
> Is t
I remember from my C++ class that when you pass arguments to subroutines you
can pass them either as a pointer to the real variable (so you modify the
original if you change it), or as a copy (which you can change all you want
and not affect the original).
Is there a perl equivalent of both of t
>...
>>$index[$#params] is a pointer to a new anonymous (?) array (0,0)
>>
>> I tried:
>>
>>@index = ([0,0]) x @params;
>>
>> ... but it seems to create a bunch of pointers to the same array, e.g.
>> $index[1][0] points to the same
(0,0)
>
> I tried:
>
>@index = ([0,0]) x @params;
>
> ... but it seems to create a bunch of pointers to the same array, e.g.
> $index[1][0] points to the same thing as $index[0][0]. I need them
> to be different.
push @index, [0, 0] for @params;
--
To
= ([0,0]) x @params;
... but it seems to create a bunch of pointers to the same array, e.g.
$index[1][0] points to the same thing as $index[0][0]. I need them to be
different.
@index = map [0,0], 0 .. $#params;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL
;
... but it seems to create a bunch of pointers to the same array, e.g.
$index[1][0] points to the same thing as $index[0][0]. I need them to be
different.
TIA.
- Bryan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/>
On Apr 11, 2005 4:20 AM, Brent Clark <[EMAIL PROTECTED]> wrote:
> Hi all
>
> If anyone has the time and / or the will to help me understand.
>
> I know how to create / use references for perl. But would why would you
> use it.
> And I think more importantly when.
>
> Im busy reading / learning
> I know how to create / use references for perl. But would why would you
> use it.
Perl uses references for multidimensional/complex datastructures. Also
used when doing OO in perl.
> And I think more importantly when.
Whenever appropriate. :) I probably make the greatest use of references
w
Am Montag, 11. April 2005 10.20 schrieb Brent Clark:
> Hi all
Hi Brent
Here's my way to explain it from an "abstract" perspective more or less
"outside" of the world of perl:
[...]
> I know how to create / use references for perl. But would why would you
> use it.
> And I think more importantly
> If anyone has the time and / or the will to help me understand.
>
> I know how to create / use references for perl. But would why would you
> use it.
> And I think more importantly when.
>
> Im busy reading / learning the Oreilly Advanced Perl Programming book.
> But for the likes of me I cant
Hi all
If anyone has the time and / or the will to help me understand.
I know how to create / use references for perl. But would why would you
use it.
And I think more importantly when.
Im busy reading / learning the Oreilly Advanced Perl Programming book.
But for the likes of me I cant undertand
if (ref($house));
return($retval) if $retval;
....
0;
}
remember the question about having an initializer that would
be able to deal with 'deep structures'
If I read a book on C++ pointers and references,
will it s
Jason Dusek wrote:
> Hi Kids,
>
> What is a pointer and what is a reference?
A pointer is a variable which holds a memory address. That is all it
holds, except possibly a classification by type, which can be morphed.
Pointers are a C/C++ topic, really. We use the term casually some
Hi Kids,
What is a pointer and what is a reference? How are they different? If
I read a book on C++ pointers and references, will it say the exact
same things as a book on Perl references?
- Jason
When Banzan was walking through the Union Square greenmarket
he overheard a conversation
Eric Walker wrote:
wow ok then I will try and use the -> notation. No need to stay behind
the times.
Just a couple of notes, someone already pointed out perlref, there is also:
perldoc perllol
perldoc perlreftut
perldoc perldsc
Which should give you a better handle on references. Depending on
On Thursday, Nov 20, 2003, at 11:51 US/Pacific, Eric Walker wrote:
Well see the key is I am passing a value to a sub this is a pointer and
I am having trouble getting access to the hash with in the subroutine
$Rules is a pointer given to me by a prewritten Database function.
&sub(\$Rules);
do yo
Send the code.
-Original Message-
From: Eric Walker [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 2:52 PM
To: Perl Newbies
Subject: RE: Pointers
Well see the key is I am passing a value to a sub this is a pointer and
I am having trouble getting access to the hash with in
Well see the key is I am passing a value to a sub this is a pointer and
I am having trouble getting access to the hash with in the subroutine
$Rules is a pointer given to me by a prewritten Database function.
&sub(\$Rules);
I am actually passing in 2 hashes and need to compare the keys. so I am
--As off Thursday, November 20, 2003 12:20 PM -0700, Eric Walker is
alleged to have said:
ok why the $$ instead of the %$?
sorry confused.
On Thu, 2003-11-20 at 12:08, Paul Kraus wrote:
$$overdate{key}
Perldoc perlref
--As for the rest, it is mine.
$$ would get you the value of a cert
wow ok then I will try and use the -> notation. No need to stay behind
the times.
On Thu, 2003-11-20 at 12:23, Bakken, Luke wrote:
> ok why the $$ instead of the %$?
>
> sorry confused.
>
> \%overData. Now how do
> I access this hash. %$overData?
Because
Subject: RE: Pointers
ok why the $$ instead of the %$?
sorry confused.
On Thu, 2003-11-20 at 12:08, Paul Kraus wrote:
$$overdate{key}
Perldoc perlref
-Original Message-
From: Eric Walker [mailto:[EM
ker [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 2:20 PM
To: Paul Kraus
Cc: 'perlgroup'
Subject: RE: Pointers
ok why the $$ instead of the %$?
sorry confused.
On Thu, 2003-11-20 at 12:08, Paul Kraus wrote:
$$overdate{key}
Perldoc perlref
-Ori
> ok why the $$ instead of the %$?
>
> sorry confused.
>
> \%overData. Now how do
> I access this hash. %$overData?
Because you're in essence doing this:
${ $overdata }{$key}
When you access a hash value, you're getting a scalar, which is why you
use a $. Perhaps this notation would be c
Subject: Pointers
Hello all, newbie here got a few questions:
I am working with pointers and I sort of understand them and then I
don't. I understand that instead of making a variable for a particular
value you can use a pointer to access the same data. So th
$$overdate{key}
Perldoc perlref
-Original Message-
From: Eric Walker [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 2:03 PM
To: perlgroup
Subject: Pointers
Hello all, newbie here got a few questions:
I am working with pointers and I sort of understand them and then I
Hello all, newbie here got a few questions:
I am working with pointers and I sort of understand them and then I
don't. I understand that instead of making a variable for a particular
value you can use a pointer to access the same data. So the new
variable stores the pointer to the old dat
ight just be Perlish for what other
> languages (C, I'm thinking) call a 'pointer'... Am I
> totally out of wack?
Yes, and no.
In C, a pointer points directly to memory. Specifically,
it points to a single memory location. Therefore, adding
and subtraction has meaning for point
I believe the two terms, reference and pointer, are equivalent. By the
way, In Java, they call it reference also, I think.
--Ahmed
[EMAIL PROTECTED] | http://www.photo.net/users/ahmed
Patrick Hall wrote:
> Hi pholks,
>
> It's taken me a while to wrap my head around
> references, since I thoug
Hi pholks,
It's taken me a while to wrap my head around
references, since I thought they were always
Perl-specific. (At least, the term 'reference' doesn't
show up in K&R!)
Anyway, it finally occurred to me that the term
'reference' might just be Perlish for what other
languages (C, I'm thinking
ight just be Perlish for what other
> languages (C, I'm thinking) call a 'pointer'... Am I
> totally out of wack?
Yes, and no.
In C, a pointer points directly to memory. Specifically,
it points to a single memory location. Therefore, adding
and subtraction has meaning for point
Ok, sorry, I just found out I can also use fetchrow_array()...
- Original Message -
From: "Filip Sneppe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 8:59 PM
Subject: DBI fetchrow_hashref(), pointers & references
> Hi,
>
Hi,
I use perl to access a MySQL database, and I have to make a lot of fairly
easy
queries, like these:
"select sourceip, sum(bytes) as sumbytes from traffic"
"select destip, sum(bytes) as sumbytes from traffic"
and then put the numbers in an html table.
The code that retrieves the data f
On Tue, 25 Sep 2001, Jeff 'japhy' Pinyan wrote:
> >my $varref = "var"; #point to the variable named $var
>
> Except that $$varref in this case will point to a package variable named
> $var, and not the $var you've defined here -- symbolic references use the
> symbol table, and my() variables are
On Sep 25, Brett W. McCoy said:
>As an example:
>
>symbolic reference
>
>my $var = 12;
>
>my $varref = "var"; #point to the variable named $var
Except that $$varref in this case will point to a package variable named
$var, and not the $var you've defined here -- symbolic references use the
symbo
On Tue, 25 Sep 2001, David Simcik wrote:
> This is a newbie question if there ever was one, but what is the difference
> between a (Perl) reference and a (C/C++ style) pointer??? The only thing
> that seems immediately obvious is that C/C++ pointers are strongly
> typed...???
--- David Simcik <[EMAIL PROTECTED]> wrote:
> Hello,
> This is a newbie question if there ever was one, but what is the difference
> between a (Perl) reference and a (C/C++ style) pointer??? The only thing
> that seems immediately obvious is that C/C++ pointers ar
Hello,
This is a newbie question if there ever was one, but what is the difference
between a (Perl) reference and a (C/C++ style) pointer??? The only thing
that seems immediately obvious is that C/C++ pointers are strongly
typed...???
Hmmm.
DTS
--
To unsubscribe, e-mail: [EMAIL
On Aug 7, Qiang Qiang said:
>Who knows how to compare two references (pointers) in OOPerl? A reference
>is neither a numeric or a string, thus "==" and "eq" are useless. Of
>course, I can use what they point at (the objects) to compare, however, I
>want to
Who knows how to compare two references (pointers) in OOPerl? A reference
is neither a numeric or a string, thus "==" and "eq" are useless. Of
course, I can use what they point at (the objects) to compare, however, I
want to know how to deal with references. Thanks a
--- Chuck Morford <[EMAIL PROTECTED]> wrote:
> I think I read somewhere that when I store a Reference in an Array it
> gets converted to a String and can no longer be used as a
> Reference...Is that right?
opps -- I misread this in my initial answer.
Using a reference in a string context will co
On Tue, 17 Jul 2001, Chuck Morford wrote:
> And about Pascal's Record Type. Is there anything equivalent in Perl
> without getting into OOP?
Linked lists are really not necessary in Perl since you can do cool things
with lists that you can't do in Pascal or C. However, I think for what
you are
n array or linked list (depending on how much time I
wanted to spend
coding) of pointers to dynamically allocated records...Then I could use the array or
list to
traverse lists of objects (things, not OOP) in the game world, and read their
properties and so
forth by dereferencing the pointers...
H
On Tue, 3 Jul 2001, Jeff 'japhy' Pinyan wrote:
> None, unless 'login' or 'authent' were one of:
>
> q qq qr qw qx s m y tr
>
> Those can't be auto-quoted with => (unless 5.6.1 has changed that).
bash$ perl -v | grep version
This is perl, version 5.004_04 built for i686-linux
bash$ perl -le '
ion.com/~perl/tut
hth,
Jos Boumans
- Original Message -
From: "Brett W. McCoy" <[EMAIL PROTECTED]>
To: "Pozsar Balazs" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 7:12 PM
Subject: RE: pointers to subs?
> On Tu
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> On Jul 3, John Edwards said:
>
> >It's messy and relies on you naming you subroutines to match the
> static data
> >stored in %funcs. It will introduce more possible points of failure
> in the
> >code, make it harder to debug and maintain. Unl
On Tue, Jul 03, 2001 at 01:12:34PM -0400, Brett W. McCoy wrote:
> Nothing. If you use the => operator, quotes around the keys are not
> required. Quotes are also not required when using single word keys hwne
> retrieving a value:
With => quotes around the keys are not -always- required. The qu
On Tue, 3 Jul 2001, Pozsar Balazs wrote:
> What's the difference between these two?:
>
> %actions = (
> login => \&welcome,
> authent => \&checkpass,
> );
> and
> %actions = (
> "login" => \&welcome,
> "authent" => \&checkpass,
> );
Nothing. If you use the => operator, q
On Tue, 3 Jul 2001, John Edwards wrote:
> It's messy and relies on you naming you subroutines to match the static data
> stored in %funcs. It will introduce more possible points of failure in the
> code, make it harder to debug and maintain. Unless you've got a really good
> reason why you need t
On Tue, 3 Jul 2001, Pozsar Balazs wrote:
> I would want to use a hash to keep pointers to functions, and then call
> them, but i'm stuck.
> So:
>
> I create:
> my %funcs=(
> "one"=> \&first,
> "two"=> \&se
> The => (fat arrow) auto-quotes the left-hand operand as long as it's a
> bareword.
>
> foo => 'bar'
>
> is the same as
>
> 'foo' => 'bar'
And also my experiences show that this auto-quotation applies for {}'s as
well:
$hash{"element"} is the same as $hash{element} ?.
Balazs Pozsar.
--
On Tue, Jul 03, 2001 at 06:49:29PM +0200, Pozsar Balazs wrote:
> What's the difference between these two?:
>
> %actions = (
> login => \&welcome,
> authent => \&checkpass,
> );
> and
> %actions = (
> "login" => \&welcome,
> "authent" => \&checkpass,
> );
Redundant punctu
On Jul 3, Pozsar Balazs said:
> %actions = (
>login => \&welcome,
>authent => \&checkpass,
> );
>
>and
>
> %actions = (
>"login" => \&welcome,
>"authent" => \&checkpass,
> );
None, unless 'login' or 'authent' were one of:
q qq qr qw qx s m y tr
Those can't be auto-quoted
Hi all, here's my next question :)
What's the difference between these two?:
%actions = (
login => \&welcome,
authent => \&checkpass,
);
and
%actions = (
"login" => \&welcome,
"authent" => \&checkpass,
);
bye
Balazs Pozsar.
--
On Jul 3, John Edwards said:
>It's messy and relies on you naming you subroutines to match the static data
>stored in %funcs. It will introduce more possible points of failure in the
>code, make it harder to debug and maintain. Unless you've got a really good
>reason why you need to do this, I'd
On Jul 3, Pozsar Balazs said:
>my %funcs=(
>"one"=> \&first,
>"two"=> \&second);
>
>Then how can I call 'first'? Obviously, using %funcs, i mean :).
There are two (general) ways to dereference arrays, hashes, and functions:
CREATE REFERENCEARROW SYNTAXSIGIL
Balazs [mailto:[EMAIL PROTECTED]]
Sent: 03 July 2001 17:33
To: [EMAIL PROTECTED]
Subject: pointers to subs?
Hi all,
I would want to use a hash to keep pointers to functions, and then call
them, but i'm stuck.
So:
I create:
my %funcs=(
"one"=> \&first,
Hi all,
I would want to use a hash to keep pointers to functions, and then call
them, but i'm stuck.
So:
I create:
my %funcs=(
"one"=> \&first,
"two"=> \&second);
Then how can I call 'first'? Obviously, using %funcs, i mean :).
thanks,
Balazs Pozsar.
--
64 matches
Mail list logo