Re: Good pointers.

2014-10-01 Thread Sebastien Feugere
; a écrit : > Hi All, > > Any good modules or pointers on following topics. > > 1) logging - for logging errors. > 2) exceptions handling. > > Thank you, > -- > Santosh >

Re: Good pointers.

2014-10-01 Thread Shlomi Fish
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

Good pointers.

2014-09-28 Thread Santosh Kumar
Hi All, Any good modules or pointers on following topics. 1) logging - for logging errors. 2) exceptions handling. Thank you, -- Santosh

Re: pointers in per

2008-06-12 Thread Jeff Peng
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 >

pointers in per

2008-06-12 Thread mani kandan
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

Re: sub args as pointers or values?

2005-12-16 Thread Bryan R Harris
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

Re: sub args as pointers or values?

2005-12-16 Thread Chris Devers
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

Re: sub args as pointers or values?

2005-12-16 Thread Wiggins d'Anconia
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

sub args as pointers or values?

2005-12-16 Thread Bryan R Harris
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

Re: initialize array of pointers to (0,0) arrays

2005-07-12 Thread Bryan R Harris
>... >>$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

RE: initialize array of pointers to (0,0) arrays

2005-07-12 Thread Bob Showalter
(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

Re: initialize array of pointers to (0,0) arrays

2005-07-11 Thread John W. Krahn
= ([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

initialize array of pointers to (0,0) arrays

2005-07-11 Thread Bryan R Harris
; ... 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/>

Re: pointers - references ??

2005-04-11 Thread Jay Savage
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

Re: pointers - references ??

2005-04-11 Thread Jonathan Paton
> 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

Re: pointers - references ??

2005-04-11 Thread John Doe
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

RE: pointers - references ??

2005-04-11 Thread Ankur Gupta
> 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

pointers - references ??

2005-04-11 Thread Brent Clark
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

Re: Pointers and References

2003-11-30 Thread drieux
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

Re: Pointers and References

2003-11-30 Thread R. Joseph Newton
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

Pointers and References

2003-11-30 Thread Jason Dusek
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

Re: Pointers

2003-11-22 Thread Wiggins d'Anconia
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

Re: Pointers

2003-11-20 Thread drieux
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

RE: Pointers

2003-11-20 Thread Paul Kraus
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

RE: Pointers

2003-11-20 Thread Eric Walker
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

RE: Pointers

2003-11-20 Thread Daniel Staal
--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

RE: Pointers

2003-11-20 Thread Eric Walker
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

RE: Pointers

2003-11-20 Thread Eric Walker
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

RE: Pointers

2003-11-20 Thread Paul Kraus
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

RE: Pointers

2003-11-20 Thread Bakken, Luke
> 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

RE: Pointers

2003-11-20 Thread Eric Walker
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

RE: Pointers

2003-11-20 Thread Paul Kraus
$$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

Pointers

2003-11-20 Thread Eric Walker
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

Re: Pointers versus References

2002-01-12 Thread Jonathan E. Paton
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

Re: Pointers versus References

2002-01-12 Thread Ahmed Moustafa
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

Pointers versus References

2002-01-12 Thread patrick hall
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

Re: Pointers versus References

2002-01-12 Thread Jonathan E. Paton
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

Re: [SOLVED] DBI fetchrow_hashref(), pointers & references

2001-12-28 Thread Filip Sneppe
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, >

DBI fetchrow_hashref(), pointers & references

2001-12-28 Thread Filip Sneppe
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

Re: References vs. Pointers???

2001-09-25 Thread Brett W. McCoy
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

Re: References vs. Pointers???

2001-09-25 Thread Jeff 'japhy' Pinyan
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

Re: References vs. Pointers???

2001-09-25 Thread Brett W. McCoy
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...???

Re: References vs. Pointers???

2001-09-25 Thread Curtis Poe
--- 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

References vs. Pointers???

2001-09-25 Thread David Simcik
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

Re: how to compare two references (pointers)?

2001-08-07 Thread Jeff 'japhy/Marillion' Pinyan
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

how to compare two references (pointers)?

2001-08-07 Thread Qiang Qiang
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

Re: How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Paul
--- 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

Re: How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Brett W. McCoy
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

How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Chuck Morford
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

RE: pointers to subs?

2001-07-03 Thread Tony Cook
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 '

Re: pointers to subs?

2001-07-03 Thread Jos I. Boumans
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

RE: pointers to subs?

2001-07-03 Thread Paul
--- 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

Re: pointers to subs?

2001-07-03 Thread Michael Fowler
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

RE: pointers to subs?

2001-07-03 Thread Brett W. McCoy
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

RE: pointers to subs?

2001-07-03 Thread Brett W. McCoy
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

Re: pointers to subs?

2001-07-03 Thread Brett W. McCoy
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

RE: pointers to subs?

2001-07-03 Thread Pozsar Balazs
> 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. --

Re: pointers to subs?

2001-07-03 Thread Paul Johnson
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

RE: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
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

RE: pointers to subs?

2001-07-03 Thread Pozsar Balazs
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. --

RE: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
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

Re: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
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

RE: pointers to subs?

2001-07-03 Thread John Edwards
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,

pointers to subs?

2001-07-03 Thread Pozsar Balazs
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. --