Thanks for all the replies. It’s been a very interesting thread.
Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Mon, Apr 3, 2017 at 6:55 PM SSC_perl wrote:
> Reading http://perldoc.perl.org/perlreftut.html I see it’s
> possible to create a scalar reference. What situation would require
> someone to create a reference to a scalar? I thought refs were only useful
> for
complex data structures. Is it just because Perl lets you, or
> is there a reason I’m not aware of? It seems like it would just be
> redundant.
They can make handy objects, whivh have to be references, but if you're
making an inside-out object which doesn't contain its own attributes, you
wa
On 04/03/2017 06:52 PM, SSC_perl wrote:
Reading http://perldoc.perl.org/perlreftut.html I see it’s possible to
create a scalar reference. What situation would require someone to create a
reference to a scalar? I thought refs were only useful for passing complex
data structures. Is
Reading http://perldoc.perl.org/perlreftut.html I see it’s possible to
create a scalar reference. What situation would require someone to create a
reference to a scalar? I thought refs were only useful for passing complex
data structures. Is it just because Perl lets you, or is there
Hi,
perldoc perlref has a good description for your questions.
http://perldoc.perl.org/perlref.html
On Wed, May 14, 2014 at 1:31 PM, Mike Dunaway ekimduna...@gmail.com wrote:
What's a good use of references? When is it ideal to use them? Why would
you want to use them?
--
To unsubscribe
Dear Mike,
There are many benefits of using references. One such advantage is when you
pass two arrays to a subroutine.
I will illustrate with an example which shows how you can pass two arrays
to a subroutine. The first example explains passing arrays without
references and the second example
Hi Mike,
On Wed, 14 May 2014 00:31:56 -0500
Mike Dunaway ekimduna...@gmail.com wrote:
What's a good use of references? When is it ideal to use them? Why would
you want to use them?
See the links from http://perl-begin.org/topics/references/ (*Note*:
perl-begin.org is my domain).
Regards
On 05/14/2014 12:31 AM, Mike Dunaway wrote:
What's a good use of references? When is it ideal to use them? Why would
you want to use them?
I learned C before I learned perl. I think understanding it in C will
also help:
http://how-to.linuxcareer.com/c-development-on-linux-pointers
On Wed, May 14, 2014 at 1:31 AM, Mike Dunaway ekimduna...@gmail.com wrote:
What's a good use of references? When is it ideal to use them? Why would you
want to use them?
Maybe a better question is when *not* to use them. I try to keep
things that don't need to be passed around or have multi
What's a good use of references? When is it ideal to use them? Why would
you want to use them?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Date: Mon, 27 Feb 2012 20:02:49 -0500
From: ekimduna...@gmail.com
To: beginners@perl.org
Subject: Introduction and Perl 5 References
While I'm posting, I may as well
ask a question related to Perl. Would anyone mind explaining references
to me like I was five years old? I read about
Sent from my LG phone
Shawn H Corey shawnhco...@gmail.com wrote:
On 12-02-27 08:02 PM, Mike wrote:
I was curious if there were any other members in the 804 area? I'm
looking to meet some other programmers in my area as I only know of one
other.
You should look for Perl Mongers in your area
Hi Paul,
On Tue, 28 Feb 2012 07:43:10 -0800
Adams Paul adams...@msn.com wrote:
Sent from my LG phone
you've sent three messages to this mailing list that only quote a previous
message in the thread in its entirety, and then consist of no original content
except for a Sent from my LG phone.
know of one other. While I'm posting, I may as well
ask a question related to Perl. Would anyone mind explaining references
to me like I was five years old? I read about them in Beginning Perl,
but I can't quite grasp them very well. Thanks!
--
To unsubscribe, e-mail: beginners-unsubscr
in the 804 area?
Do you mean, phone area code of 804?. See if this helps
http://www.pm.org/groups/united_states_of_america.html
Would anyone mind explaining references to me like I was five years old?
References are like pointers in C. References can be created to different
data structures like
On 12-02-27 08:02 PM, Mike wrote:
I was curious if there were any other members in the 804 area? I'm
looking to meet some other programmers in my area as I only know of one
other.
You should look for Perl Mongers in your area at http://www.pm.org/
--
Just my 0.0002 million dollars worth,
in the 804 area? I'm looking to meet some other programmers in
my area as I only know of one other. While I'm posting, I may as well
ask a question related to Perl. Would anyone mind explaining references
to me like I was five years old? I read about them in Beginning Perl,
but I can't quite
On Mon, Jan 23, 2012 at 2:12 AM, David Christensen
dpchr...@holgerdanske.com wrote:
beginners@perl.org:
While coding some tests tonight, I discovered that Scalar::Util::blessed()
considers Regexp references to be blessed.
Is this a bug or a feature?
Implementation detail. Internally
beginners@perl.org:
While coding some tests tonight, I discovered that
Scalar::Util::blessed() considers Regexp references to be blessed.
Is this a bug or a feature?
TIA,
David
2012-01-22 21:07:57 dpchrist@p43400e ~/sandbox/perl
$ cat blessed
#! /usr/bin/perl
# $Id: blessed,v 1.1 2012
On 12/18/2011 08:53 PM, David Christensen wrote:
beginners@perl.org:
I'm working on some classes with attributes that are array and hash
references, and am confused by what happens when I attempt to slice an
array or hash reference. For example:
7. $ra-[0, 1, 2] evaluates to $ra-[2].
8. $ra
beginners@perl.org:
I'm working on some classes with attributes that are array and hash
references, and am confused by what happens when I attempt to slice an
array or hash reference. For example:
7. $ra-[0, 1, 2] evaluates to $ra-[2].
8. $ra-[0 .. 2] produces two Use of uninitialized
David Christensen wrote:
beginners@perl.org:
Hello,
I'm working on some classes with attributes that are array and hash
references, and am confused by what happens when I attempt to slice an
array or hash reference. For example:
7. $ra-[0, 1, 2] evaluates to $ra-[2].
$ra is a scalar
On 11-12-18 09:05 PM, John W. Krahn wrote:
David Christensen wrote:
beginners@perl.org:
Hello,
I'm working on some classes with attributes that are array and hash
references, and am confused by what happens when I attempt to slice an
array or hash reference. For example:
7. $ra-[0, 1, 2
On 12/18/2011 06:05 PM, John W. Krahn wrote:
$ra is a scalar that holds a reference to an array. $ra-[0]
dereferences an array element. To dereference an array slice use:
@{ $ra }[ 0, 1, 2 ]
...
@{ $ra }[ 0 .. 2 ]
On 12/18/2011 06:14 PM, Shawn H Corey wrote:
my @slice = @$ra[ 1, 2, 3 ];
...
On 2011-11-25 10:50, timothy adigun wrote:
Mike Dekimduna...@gmail.com wrote:
# this function expects an array to be passed by reference
sub foo
{
my ($thing1) = @_; # make a lexical variable for the array being passed
Fine, but since you are getting a reference, I don't really think
On 2011-11-25 10:50, timothy adigun wrote:
for (@$thing1) # to access the whole array after referencing
for clarity use: for (@{$thing1}){...}
For clarity, I prefer it like this:
for my $t ( @$thing1 ) {
...;
}
So with plenty of cheap white space.
--
Ruud
--
To
On 2011-11-25 10:50, timothy adigun wrote:
Mike Dekimduna...@gmail.com wrote:
my @array = (1,2,3,4);
my $array=[qw(1 2 3 4)];
Another ill advice. There is no need to add a dereferencing level here.
A scalar has no inherent type, a construct like \@data has.
('type' in the Perl sense:
Hi Mike D,
Some comments on your codes:
Mike D ekimduna...@gmail.com wrote:
Considering the following code, are all my comments correct?
# this function expects an array to be passed by reference
sub foo
{
my ($thing1) = @_; # make a lexical variable for the array being passed
Fine,
Mike D wrote:
Hi all,
Hello,
just started using Perl today, coming over from a background in
C#/Java and Python.
I seem to be grasping Perl rather nicely (I think) until I got up to
references in Beginning Perl.
Considering the following code, are all my comments correct?
They appear
timothy adigun wrote:
Hi Mike D,
Some comments on your codes:
Mike Dekimduna...@gmail.com wrote:
Considering the following code, are all my comments correct?
# this function expects an array to be passed by reference
sub foo
{
my ($thing1) = @_; # make a lexical variable for the array
Hi Mike,
On Thu, 24 Nov 2011 23:28:39 -0500
Mike D ekimduna...@gmail.com wrote:
Hi all, just started using Perl today, coming over from a background in
C#/Java and Python.
Welcome to Perl.
I seem to be grasping Perl rather nicely (I think) until I got up to
references in Beginning Perl
On Fri, 25 Nov 2011 10:50:01 +0100
timothy adigun 2teezp...@gmail.com wrote:
Hi Mike D,
Some comments on your codes:
Mike D ekimduna...@gmail.com wrote:
Considering the following code, are all my comments correct?
# this function expects an array to be passed by reference
sub foo
Hello,
== John,
TIMTOWTDI =There Is More Than One Way To Do It , I know that! I was
stating/showing option(s). Since, the programmer will take resposiblity for
it own coding styles!
=== Fish,
«my ($thing1) = @_;» is OK. «my $thing1 = @_;» is not OK, as it will
take scalar(@_); which is the
On 25/11/2011 12:39, timothy adigun wrote:
== John,
TIMTOWTDI =There Is More Than One Way To Do It , I know that! I was
stating/showing option(s). Since, the programmer will take resposiblity for
it own coding styles!
I think John's point is that you were simply rewriting code for the sake
On 25/11/2011 09:56, John W. Krahn wrote:
Mike D wrote:
It's pretty confusing, especially since BP uses prototypes during
the example
British Petroleum?
Beginning Perl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
On Fri, Nov 25, 2011 at 07:39, timothy adigun 2teezp...@gmail.com wrote:
The first two links are to pirated copies of O'Reilly books.
What is your point?
The point is this: Please don't post links to pirated materials on
this list. Doing so again will get you removed from the list.
john,
On 11-11-24 11:28 PM, Mike D wrote:
It's pretty confusing, especially since BP uses prototypes during the
example, which I'm told are bad? Never use them?
Prototypes in Perl are not the same as in C. Don't use them. Using them
is an advance technique that changes the syntax of the language.
Hi Rob,
The first two links are to pirated copies of O'Reilly books.
What is your point?
Shlomi's point is presumably that it is inappropriate to encourage
piracy on this list.
Thanks, I appericiate that and I also support Shlomi's view then!
Hi John aka List Mom,
The point is this:
On 11-11-25 09:51 AM, timothy adigun wrote:
Hi Rob,
The first two links are to pirated copies of O'Reilly books.
What is your point?
Shlomi's point is presumably that it is inappropriate to encourage
piracy on this list.
Thanks, I appericiate that and I also support Shlomi's view
Rob Dixon wrote:
On 25/11/2011 09:56, John W. Krahn wrote:
Mike D wrote:
It's pretty confusing, especially since BP uses prototypes during
the example
British Petroleum?
Beginning Perl
Thanks. :-)
John
--
Any intelligent fool can make things bigger and
more complex... It takes a
Hi all, just started using Perl today, coming over from a background in
C#/Java and Python.
I seem to be grasping Perl rather nicely (I think) until I got up to
references in Beginning Perl.
Considering the following code, are all my comments correct?
# this function expects an array
On 20/11/2011 04:14, Chris Charley wrote:
Well, if Dr Ruud is right, and you shouldn't replace the undefs in the
original arrays, then the following program wouldn't be correct. It
changes the original array (data).
On 20/11/2011 00:23, Dr.Ruud wrote:
Unless you really want to change your
Unless you really want to change your data, use map().
Ruud didn't say that you shouldn't change the data, only that you should
use map unless that was what you wanted. Who knows what the OP wants.
Rob
Sorry for the delay.
What Shlomi Fish mentioned was I wanted. Thanks for all your
On 19/11/2011 18:21, Mohan L wrote:
Dear all,
#!/usr/bin/env perl
#dummy.pl
use strict;
use warnings;
use Data::Dumper;
my $ref_to_AoA = [
[ fred, barney,undef,pebbles, bambam, dino, ],
[ homer,undef,bart,undef, marge, maggie, ],
[ george, jane,undef,
Mohan L wrote in message
news:cadihtmt4rqntknjlgsimpgqv9xuc89dryhtx00ctwbknxwd...@mail.gmail.com...
Dear all,
#!/usr/bin/env perl
#dummy.pl
use strict;
use warnings;
use Data::Dumper;
my $ref_to_AoA = [
[ fred, barney,undef,pebbles, bambam, dino, ],
[
Dear all,
#!/usr/bin/env perl
#dummy.pl
use strict;
use warnings;
use Data::Dumper;
my $ref_to_AoA = [
[ fred, barney,undef,pebbles, bambam, dino, ],
[ homer,undef,bart,undef, marge, maggie, ],
[ george, jane,undef, elroy,undef,judy, ],
];
print Dumper
Hi Mohan,
On Sat, 19 Nov 2011 23:51:19 +0530
Mohan L l.mohan...@gmail.com wrote:
Dear all,
#!/usr/bin/env perl
#dummy.pl
use strict;
use warnings;
use Data::Dumper;
my $ref_to_AoA = [
[ fred, barney,undef,pebbles, bambam, dino, ],
[ homer,undef,bart,undef, marge,
On 2011-11-19 19:21, Mohan L wrote:
But What I want is, I want to replace all 'undef' to a string 'foo'.
Unless you really want to change your data, use map().
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
On 2010-09-25 13:07, John W. Krahn wrote:
Dr.Ruud wrote:
On 2010-09-25 01:57, Vaishnavi Saba wrote:
My query: In the code shown below, How does *grep* compare a scalar( *
$seen{$_}* ) with an array of hash references ( *...@_* ).
=
@common = inter( \%foo, \%bar, \%joe );
sub inter
On 2010-09-25 01:57, Vaishnavi Saba wrote:
My query: In the code shown below, How does *grep* compare a scalar( *
$seen{$_}* ) with an array of hash references ( *...@_* ).
=
@common = inter( \%foo, \%bar, \%joe );
sub inter {
my %seen;
for my $href ( @_ ) {
while
Dr.Ruud wrote:
On 2010-09-25 01:57, Vaishnavi Saba wrote:
My query: In the code shown below, How does *grep* compare a scalar( *
$seen{$_}* ) with an array of hash references ( *...@_* ).
=
@common = inter( \%foo, \%bar, \%joe );
sub inter {
my %seen;
for my $href ( @_ ) {
while (my
Hi,
My query: In the code shown below, How does *grep* compare a scalar( *
$seen{$_}* ) with an array of hash references ( *...@_* ).
=
@common = inter( \%foo, \%bar, \%joe );
sub inter {
my %seen;
for my $href (@_) {
while (my $k = each %$href ) {
$seen{$k
Vaishnavi Saba wrote:
Hi,
Hello,
My query: In the code shown below, How does *grep* compare a scalar( *
$seen{$_}* ) with an array of hash references ( *...@_* ).
An array in scalar context returns the number of elements in the array
and @_ (which is an alias to @common) contains 3
).
These are the addresses of the hash-references in @_. You should try
using Data::Dumper:
use Data::Dumper;
print Dumper(@_); #or \...@_ rather
to see what is actually in the hashes.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
On Wed, 28 Apr 2010 01:16:16 -0400, Uri Guttman wrote:
PS == Peter Scott pe...@psdt.com writes:
PS On Mon, 26 Apr 2010 22:16:27 +0800, Tim Bowden wrote:
I've just realised I almost never use named arrays or hashes
anymore. It's almost always anonymous references instead
PS == Peter Scott pe...@psdt.com writes:
PS On Mon, 26 Apr 2010 22:16:27 +0800, Tim Bowden wrote:
I've just realised I almost never use named arrays or hashes anymore.
It's almost always anonymous references instead. That lead me to wonder
what criteria experienced perl hackers have
On Mon, 26 Apr 2010 22:16:27 +0800, Tim Bowden wrote:
I've just realised I almost never use named arrays or hashes anymore.
It's almost always anonymous references instead. That lead me to wonder
what criteria experienced perl hackers have as to when to use a named
array or hash, and when
I've just realised I almost never use named arrays or hashes anymore.
It's almost always anonymous references instead. That lead me to wonder
what criteria experienced perl hackers have as to when to use a named
array or hash, and when to start with an anonymous ref instead. My very
informal
On Monday 26 Apr 2010 17:16:27 Tim Bowden wrote:
I've just realised I almost never use named arrays or hashes anymore.
It's almost always anonymous references instead. That lead me to wonder
what criteria experienced perl hackers have as to when to use a named
array or hash, and when to start
I've got a nested hash data structure, and I want to create tests for
many of the attributes within that data structure, but I'm not sure of
the best way to do that.
Example:
my $dataStructure = {'GroupA'={
'element1'={
'attrib1'='someValue', 'attrib2'='otherValue'},
'element2'={
Hi Tim,
On Friday 16 Apr 2010 12:06:31 Tim Bowden wrote:
I've got a nested hash data structure, and I want to create tests for
many of the attributes within that data structure, but I'm not sure of
the best way to do that.
Example:
my $dataStructure = {'GroupA'={
'element1'={
On Fri, 2010-04-16 at 12:51 +0300, Shlomi Fish wrote:
Hi Tim,
On Friday 16 Apr 2010 12:06:31 Tim Bowden wrote:
I've got a nested hash data structure, and I want to create tests for
many of the attributes within that data structure, but I'm not sure of
the best way to do that.
Steve Bertrand wrote:
Hi!
Well, working on windows does have its benefits. When something goes
horribly wrong, you can always point the finger to Redmont and your
users will believe you (not matter who's fault it really is)...
I can tell you work in an Enterprise environment already ;)
Hello,
I need help by using threads in combination with external packages (modules).
At main script threads were created and within these threads an
database-handler was defined.
My Intention is to use this database-handler within a method of the external
module.
The paramlist of my method
Hi,
On Wednesday 07 Apr 2010 14:59:08 Frenzel, Joerg (ext) wrote:
Hello,
I need help by using threads in combination with external packages
(modules).
I would really recommend against using threads:
* http://perldoc.perl.org/perlthrtut.html
*
Shlomi Fish wrote:
I would really recommend against using threads:
* http://perldoc.perl.org/perlthrtut.html
* http://www.perlmonks.org/index.pl?node_id=288022
They don't work as expected in Perl (though in C/C++, .NET and/or Java, they
may be an option[Thr]), and cause too many problems. If
Hi Shawn,
On Wednesday 07 Apr 2010 16:05:24 Shawn H Corey wrote:
Shlomi Fish wrote:
I would really recommend against using threads:
* http://perldoc.perl.org/perlthrtut.html
* http://www.perlmonks.org/index.pl?node_id=288022
They don't work as expected in Perl (though in C/C++,
Shlomi Fish wrote:
Nevertheless, if you are going to run Perl on UNIX systems exclusively, you
shouldn't use threads. And if you're planning to do such multi-tasking on
Windows using Perl - please reconsider.
Personally, I don't see why anyone would want to run Windows. It's like
trying to
Shawn H Corey wrote:
Personally, I don't see why anyone would want to run Windows. It's like
trying to run a marathon while dragging a bus.
For me, its mainly because it pays the rent.
You know, girls sell their body, boys sell their soul. Or something like
that.
LG
Rene
--
To
Rene Schickbauer wrote:
Shawn H Corey wrote:
Personally, I don't see why anyone would want to run Windows. It's
like trying to run a marathon while dragging a bus.
For me, its mainly because it pays the rent.
I did say, want to not have to :)
--
Just my 0.0002 million dollars
From: Shawn H Corey
Shlomi Fish wrote:
Nevertheless, if you are going to run Perl on UNIX systems
exclusively, you
shouldn't use threads. And if you're planning to do such
multi-tasking on
Windows using Perl - please reconsider.
Personally, I don't see why anyone would want to run
Shawn H Corey wrote:
Rene Schickbauer wrote:
Shawn H Corey wrote:
Personally, I don't see why anyone would want to run Windows. It's
like trying to run a marathon while dragging a bus.
For me, its mainly because it pays the rent.
I did say, want to not have to :)
Well, working on
On 2010.04.07 19:19, Rene Schickbauer wrote:
Shawn H Corey wrote:
Rene Schickbauer wrote:
Shawn H Corey wrote:
Personally, I don't see why anyone would want to run Windows. It's
like trying to run a marathon while dragging a bus.
For me, its mainly because it pays the rent.
I did say,
of the BGFL
stuff from my browsers and computers I would appreciate posting the removal
technology, please!
--- On Wed, 1/6/10, jay taylor jaytay2...@yahoo.com wrote:
From: jay taylor jaytay2...@yahoo.com
Subject: Please remove all references in mail archive
To: beginners@perl.org
Date
Hello,
I am reggie kogulan.
Please remove all references in beginners.perl.org.
Back in 2003, I was subscribing to this list and I stopped it.
I did post many messages. I want them to be removed. Because,
I did not have idea, you will be posting everything on the internet.
Google is able
am reggie kogulan.
Please remove all references in beginners.perl.org.
Back in 2003, I was subscribing to this list and I stopped it.
I did post many messages. I want them to be removed. Because,
I did not have idea, you will be posting everything on the internet.
Google is able to find me
jm wrote:
thought
if this person really believes he has any expectation of privacy regarding
any aspect of the internet, then i have some prime swampland in the sahara
i'd love to sell him
end thought
good luck with that
Please don't feed the trolls.
--
Just my 0.0002 million
thank you very much everybody! I appreciate your help.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Why does
$foobar = \(foo, bar);
print $$foobar;
print bar ??
Thank you for any insight. Mark
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Mark_Galeck wrote:
Why does
$foobar = \(foo, bar);
print $$foobar;
print bar ??
Thank you for any insight. Mark
Because \(foo, bar) is really (\foo, \bar) and the comma
operator in scalar context will return the last item listed so:
$foobar = \(foo, bar);
Is just:
$foobar = \bar;
Just replying to add that you can use square brackets for an array literal:
$foobar = ['foo', 'bar'];
See http://perldoc.perl.org/perlref.html#Making-References .
John
On Sat, Nov 28, 2009 at 5:53 AM, John W. Krahn jwkr...@shaw.ca wrote:
Mark_Galeck wrote:
Why does
$foobar = \(foo, bar
= ['foo', 'bar'];
See http://perldoc.perl.org/perlref.html#Making-References .
John
On Sat, Nov 28, 2009 at 5:53 AM, John W. Krahn jwkr...@shaw.ca wrote:
Mark_Galeck wrote:
Why does
$foobar = \(foo, bar);
print $$foobar;
print bar ??
Thank you for any insight. Mark
Because
Why does
$foobar = \(foo, bar);
print $$foobar;
print bar ??
Thank you for any insight. Mark
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello all,
Recently I faced one scenario with references and array slice in perl.
I used following program to retrieve the rows from a table in Oracle using
Perl DBI.
As shown in the program, I did following steps to retrieve the rows :-
- used fetchall_arrayref to get the array reference
it on a fairly modern Perl interpreter. Perl will throw a
warning like Scalar value @a[0] better written as $a[0] at z.pl line
8. It is interesting a warning isn't thrown for references. I shall
have to research that.
#!/usr/bin/perl
use strict;
use warnings;
my @a = qw/a b c/;
print @a[0], \n;
All
On Aug 30, 3:01 am, [EMAIL PROTECTED] (Patrick Dupre) wrote:
.
.
I do:
AV* av ;
then av = (AV*) svRV (retval) ;
Looks ok to me. Install Inline::C so that you can quickly and easily
test things out:
use warnings;
use strict;
use Inline C = Config =
Hello,
Calling a sub from perl, if this sub return an address on an array,
it is not a problem, perl seems to manage correctly the memory to
keep allocated, and I can access to the data through the reference
at any time.
Making the same call from a CPP method seems not to work.
If I quit the
Patrick Dupre wrote:
Calling a sub from perl, if this sub return an address on an array,
it is not a problem, perl seems to manage correctly the memory to
keep allocated, and I can access to the data through the reference
at any time.
Making the same call from a CPP method seems not to
Calling a sub from perl, if this sub return an address on an array,
it is not a problem, perl seems to manage correctly the memory to
keep allocated, and I can access to the data through the reference
at any time.
Making the same call from a CPP method seems not to work.
If I quit the method and
simple - that did it. of course I removed the my when defining
$templateConfiguation in the for loop.
thanks!
Raymond Wan wrote:
Hi Noah,
Would defining $templateConfiguration outside of the for loop be
sufficient for what you need?
i.e.,
my $templateConfiguation;
foreach my
Hi Noah,
Would defining $templateConfiguration outside of the for loop be
sufficient for what you need?
i.e.,
my $templateConfiguation;
foreach my $templateConfigFilename (@templateConfigFilenames) {
$templateConfigFilename = $TemplateDirectory/$templateConfigFilename;
(my
My friend is trying to do this:
#!/bin/perl
$a = 1;
$b = 2;
$c = 3;
@l = ( \$a, \$b, \$c );
# This is the line we need help with
# Is there a way to tell Perl that @l[0] is a reference
# and we want to assign what it refers to the number 4.
# i.e. ${$l[0]} = 4;
# but for the whole list in @l
response inline below
John W. Krahn wrote:
Noah wrote:
Hi there,
Hello,
I have a routine returning a perl reference and I am trying to figure
out how to properly use the hash tables in the main section of my perl
proggie.
--- from the main program
my $templateConfiguation =
Noah wrote:
response inline below
John W. Krahn wrote:
Noah wrote:
I have a routine returning a perl reference and I am trying to figure
out how to properly use the hash tables in the main section of my
perl proggie.
--- from the main program
my $templateConfiguation =
a
list of references and return the corresponding list of referents.
To my knowledge, no such operator exists. Sorry.
You can dereference a single reference to an array. But you can't
dereference a list of references to scalars.
Best you could do would probably be something involving a postfix
John W. Krahn wrote:
Noah wrote:
response inline below
John W. Krahn wrote:
Noah wrote:
I have a routine returning a perl reference and I am trying to
figure out how to properly use the hash tables in the main section
of my perl proggie.
--- from the main program
my
On Mon, 2008-08-18 at 15:10 -0700, Noah wrote:
print DIFF d $key if !exists
($templateConfiguation{$templateType}{$key});
print MATCH m $key if exists
($templateConfiguation{$templateType}{$key});
Try:
print DIFF d $key if !exists
2008/6/11 Rob Dixon [EMAIL PROTECTED]:
Dermot wrote:
Hi All,
..snip
So how do you create a code reference in this context, should I create
a code reference or use something else and what should I be test the
hash values for?
Thanx in advance.
Dp.
#!/usr/bin/perl
use strict;
use
Hi All,
I was have to create a script to search and find files. The files will
end in 'a.txt', 'b.txt', 'c.txt', so a record could have 123a.txt,
123b.txt, 123c.txt.
There may be lots of ways to achieve my goal but I got curious about
how to create a structure that, for each record would store
1 - 100 of 472 matches
Mail list logo