[30330] in Perl-Users-Digest
Perl-Users Digest, Issue: 1573 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 23 21:09:44 2008
Date: Fri, 23 May 2008 18:09:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 23 May 2008 Volume: 11 Number: 1573
Today's topics:
Re: FAQ 4.59 How do I sort a hash (optionally by value <brian.d.foy@gmail.com>
Re: FAQ 4.59 How do I sort a hash (optionally by value <1usa@llenroc.ude.invalid>
Re: import CSV files to Excel <1usa@llenroc.ude.invalid>
Re: import CSV files to Excel <someone@example.com>
Re: import CSV files to Excel <1usa@llenroc.ude.invalid>
Re: Range of number <abigail@abigail.be>
Re: reference/alias in perl vs reference/alias in C++ <jimsgibson@gmail.com>
Re: reference/alias in perl vs reference/alias in C++ <cdalten@gmail.com>
Re: reference/alias in perl vs reference/alias in C++ <jurgenex@hotmail.com>
Re: reference/alias in perl vs reference/alias in C++ acehreli@gmail.com
Re: reference/alias in perl vs reference/alias in C++ <cdalten@gmail.com>
Re: reference/alias in perl vs reference/alias in C++ <1usa@llenroc.ude.invalid>
Re: reference/alias in perl vs reference/alias in C++ <cdalten@gmail.com>
Re: reference/alias in perl vs reference/alias in C++ <jurgenex@hotmail.com>
Re: reference/alias in perl vs reference/alias in C++ <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 24 May 2008 00:18:09 +0200
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 4.59 How do I sort a hash (optionally by value instead of key)?
Message-Id: <240520080018098747%brian.d.foy@gmail.com>
In article
<1dc5ae3f-58f8-4995-b508-ca0a237287a3@i76g2000hsf.googlegroups.com>,
nolo contendere <simon.chao@fmr.com> wrote:
>
> really? is this some sort (har har) of perverse humor? or is there
> some intelligence that does NLP on the posts to figure out which FAQ
> to post? and no, i'm not paranoid--they really are out to get me.
I'm not sure what you are asking. The FAQ are posted sequentially.
Since the answers are to frequently asked questions, it's expected that
the answer would show up at the same time as someone asks the
question.
------------------------------
Date: Fri, 23 May 2008 22:48:29 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: FAQ 4.59 How do I sort a hash (optionally by value instead of key)?
Message-Id: <Xns9AA7BF533AF92asu1cornelledu@127.0.0.1>
brian d foy <brian.d.foy@gmail.com> wrote in news:240520080018098747%brian.d.foy@gmail.com:
> In article
> <1dc5ae3f-58f8-4995-b508-ca0a237287a3@i76g2000hsf.googlegroups.com>,
> nolo contendere <simon.chao@fmr.com> wrote:
>
>>
>> really? is this some sort (har har) of perverse humor? or is there
>> some intelligence that does NLP on the posts to figure out which FAQ
>> to post? and no, i'm not paranoid--they really are out to get me.
>
> I'm not sure what you are asking. The FAQ are posted sequentially.
> Since the answers are to frequently asked questions, it's expected that
> the answer would show up at the same time as someone asks the
> question.
He is referring to the following thread:
http://groups.google.com/group/comp.lang.perl.misc/browse_thread/thread/e9ebb8db8db998f1/3e2cab2f34be8bcc
http://preview.tinyurl.com/4o9rea
If, instead of fully quoting the FAQ post, he had only included the
title of the question, his attempt at humor might have been more obvious.
At least, I am assuming that was an attempt at a joke.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Fri, 23 May 2008 21:38:41 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: import CSV files to Excel
Message-Id: <Xns9AA7B37D75B06asu1cornelledu@127.0.0.1>
Jim Gibson <jimsgibson@gmail.com> wrote in
news:230520081003017973%jimsgibson@gmail.com:
> In article <Xns9AA776D193416asu1cornelledu@127.0.0.1>, A. Sinan Unur
> <1usa@llenroc.ude.invalid> wrote:
>
>> Slickuser <slick.users@gmail.com> wrote in
>> news:f3335554-6d5b-4169-b48a-3e7e46502472
@s50g2000hsb.googlegroups.com
>> :
>>
>
>>
>> As far as I can tell, what you are doing is equivalent to:
>>
>> sprintf( '[ %s ]', join(',', (1) x @cells ) );
>>
>> >> last;
>> >> }
>> >> close(CSV);
>>
>> Why do you do this for every line in the CSV file? If this is a
>> rectangular data set, the number of columns does not change. If it is
>> jagged, what is the point of overwriting $column possibly thousands
>> of times
>
> Thanks for responding to this post. I tried and failed to make sense
> of it, too, and gave up. However, I think because of the 'last;'
Ooops. It was right in front of me but I missed. I think this is as good
as an excuse as any to point out that the whole thing should be replaced
with:
my $column = eval {
open my $csv, '<', $filename or die "Cannot open '$filename': $!";
my $header = <$csv>;
defined $header or die "Cannot read from '$filename': $!";
sprintf( '[ %s ]', join(q{,}, (1) x @fields) );
};
die $@ if $@;
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Fri, 23 May 2008 23:01:44 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: import CSV files to Excel
Message-Id: <s1IZj.4561$KB3.2101@edtnps91>
A. Sinan Unur wrote:
> Jim Gibson <jimsgibson@gmail.com> wrote in
> news:230520081003017973%jimsgibson@gmail.com:
>
>> In article <Xns9AA776D193416asu1cornelledu@127.0.0.1>, A. Sinan Unur
>> <1usa@llenroc.ude.invalid> wrote:
>>
>>> Slickuser <slick.users@gmail.com> wrote in
>>> news:f3335554-6d5b-4169-b48a-3e7e46502472
> @s50g2000hsb.googlegroups.com
>>> :
>>>
>>> As far as I can tell, what you are doing is equivalent to:
>>>
>>> sprintf( '[ %s ]', join(',', (1) x @cells ) );
>>>
>>>>> last;
>>>>> }
>>>>> close(CSV);
>>> Why do you do this for every line in the CSV file? If this is a
>>> rectangular data set, the number of columns does not change. If it is
>>> jagged, what is the point of overwriting $column possibly thousands
>>> of times
>> Thanks for responding to this post. I tried and failed to make sense
>> of it, too, and gave up. However, I think because of the 'last;'
>
> Ooops. It was right in front of me but I missed. I think this is as good
> as an excuse as any to point out that the whole thing should be replaced
> with:
>
> my $column = eval {
> open my $csv, '<', $filename or die "Cannot open '$filename': $!";
> my $header = <$csv>;
> defined $header or die "Cannot read from '$filename': $!";
> sprintf( '[ %s ]', join(q{,}, (1) x @fields) );
> };
>
> die $@ if $@;
Why use eval()? Why not:
my $column = do {
open my $csv, '<', $filename or die "Cannot open '$filename': $!";
my $header = <$csv>;
defined $header or die "Cannot read from '$filename': $!";
sprintf '[ %s ]', join ',', (1) x @fields;
};
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Fri, 23 May 2008 23:14:40 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: import CSV files to Excel
Message-Id: <Xns9AA7C3C399413asu1cornelledu@127.0.0.1>
"John W. Krahn" <someone@example.com> wrote in
news:s1IZj.4561$KB3.2101@edtnps91:
> A. Sinan Unur wrote:
...
>> my $column = eval {
>> open my $csv, '<', $filename or die "Cannot open '$filename':
>> $!"; my $header = <$csv>;
>> defined $header or die "Cannot read from '$filename': $!";
>> sprintf( '[ %s ]', join(q{,}, (1) x @fields) );
>> };
>>
>> die $@ if $@;
>
> Why use eval()? Why not:
>
> my $column = do {
> open my $csv, '<', $filename or die "Cannot open '$filename':
> $!"; my $header = <$csv>;
> defined $header or die "Cannot read from '$filename': $!";
> sprintf '[ %s ]', join ',', (1) x @fields;
> };
Yup, clearly do would be fine here. Don't know why I used eval here
(with no real benefit and the cost of an extra error check). I was in a
try-n-catch mood apparently.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: 23 May 2008 19:57:24 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Range of number
Message-Id: <slrng3e8d4.2nh.abigail@alexandra.abigail.be>
_
szr (szrRE@szromanMO.comVE) wrote on VCCCLXXIX September MCMXCIII in
<URL:news:g16tcg0pje@news4.newsguy.com>:
][ Dr.Ruud wrote:
][ >
][ > In Perl6 you can write
][ >
][ > if ( $MINNUM <= $number <= $MAXNUM )
][
][ While I can see the convience in that, I can also see people slipping on
][ this, as most other languages (including Perl 5), would parse that by
][ first evaulating a boolean result from ($MINNUM <= $number) and then
][ (result <= $MAXNUM)... I don't know if any real code actually depends on
][ that behavior, but Perl 6 does seem to make that more useful.
Actually, in Perl 5 isn't like "most other languages", as in Perl 5,
chained comparisons are a syntax error:
perl -e 'print if 1 < 2 < 3'
So I highly doubt any Perl 5 programmer 'slipping up'.
As for other languages, IIRC, chained comparisons have always worked the
way they will in Perl 6.
][ Any word on such a construct making it's way into Perl 5 (5.12 perhaps?)
][ ?
Considering it's currently a syntax error, I doubt there will be much
resistance if someone provides a patch.
But as long as noone provides a patch, it's highly unlike to find its way
in any version of Perl 5.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
------------------------------
Date: Fri, 23 May 2008 12:22:04 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <230520081222045692%jimsgibson@gmail.com>
In article
<8f8a7081-f03a-4063-9999-36ba6dd1619f@u12g2000prd.googlegroups.com>,
grocery_stocker <cdalten@gmail.com> wrote:
> How are references and aliases in perl different than references in
> aliases in C++?
Some differences (not exhaustive):
Aliases in Perl are like references in C++: a different way of
accessing the same object.
References in Perl are like pointers in C/C++: indirect access to an
object. However, in Perl you cannot do arithmetic on references the way
you can for C/C++ pointers (e.g. *(p++) = getchar();)
In Perl, references are scalars, not separate pointer types as in C/C++.
In C/C++, arrays are really pointers to the first element in a
contiguous set of elements. In Perl, arrays are separate objects. A
reference to an array in Perl is different than a reference to one of
the members of the array.
--
Jim Gibson
------------------------------
Date: Fri, 23 May 2008 12:41:56 -0700 (PDT)
From: grocery_stocker <cdalten@gmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <7e2f37b0-b75a-4f1e-b6d4-58c93a5d12ea@q27g2000prf.googlegroups.com>
On May 23, 12:22 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
> In article
> <8f8a7081-f03a-4063-9999-36ba6dd16...@u12g2000prd.googlegroups.com>,
>
> grocery_stocker <cdal...@gmail.com> wrote:
> > How are references and aliases in perl different than references in
> > aliases in C++?
>
> Some differences (not exhaustive):
>
> Aliases in Perl are like references in C++: a different way of
> accessing the same object.
>
> References in Perl are like pointers in C/C++: indirect access to an
> object. However, in Perl you cannot do arithmetic on references the way
> you can for C/C++ pointers (e.g. *(p++) = getchar();)
>
> In Perl, references are scalars, not separate pointer types as in C/C++.
>
> In C/C++, arrays are really pointers to the first element in a
> contiguous set of elements. In Perl, arrays are separate objects. A
> reference to an array in Perl is different than a reference to one of
> the members of the array.
>
> --
> Jim Gibson
Everytime I ask a question on the newsgroup, i keep on thinking "I'm
sure things would have been a lot easier if I would have taken more
than 6 week of FORTRAN." I don't care what anyone says. Learning to
program on your own. mastering the core concepts without formal
schooling, and then actually making it as a programmer takes a certain
level of skill and internal drive. Not everyone has it.
I think I only know a few people with no more than a high school
education that are doing the same kind of work, for the exact same
pay, as a person with an advanced degree in the sciences.
------------------------------
Date: Fri, 23 May 2008 19:59:37 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <b88e34t1a4s1aoluqq0ep4uo3chgi2gikd@4ax.com>
>On May 23, 12:22 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
>> grocery_stocker <cdal...@gmail.com> wrote:
>> > How are references and aliases in perl different than references in
>> > aliases in C++?
>> References in Perl are like pointers in C/C++: indirect access to an
>> object. However, in Perl you cannot do arithmetic on references the way
>> you can for C/C++ pointers (e.g. *(p++) = getchar();)
Another very major difference: in C pointers are just (virtual) memory
addresses and the programmer is forced to implement his own memory
management for objects that are addressed by pointers.
In Perl any memory management for objects referred to by references is
done automatically by the system.
jue
------------------------------
Date: Fri, 23 May 2008 14:14:47 -0700 (PDT)
From: acehreli@gmail.com
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <d9d8aa91-95f3-4877-9ddc-a4655405b809@p25g2000pri.googlegroups.com>
On May 23, 12:22 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
> In C/C++, arrays are really pointers to the first element in a
> contiguous set of elements.
That is a common misconception.
An array is the contiguous set of elements that you mention; there is
no extra pointer. True, the name of the array decays to a pointer to
first element in certain contexts; but still, there is no extra
pointer to make an array.
> In Perl, arrays are separate objects. A
> reference to an array in Perl is different than a reference to one of
> the members of the array.
That is exactly the case in C++ as well. Here is a program with a
function that takes an array as a separate object (not as a pointer to
its first element):
#include <assert.h>
typedef int TwoIntArray[2];
void as_array(TwoIntArray & array)
{
// Here, the type is int[2]
assert(sizeof(array) == sizeof(TwoIntArray));
}
void as_pointer(int * p)
{
// Here, the type is int*
assert(sizeof(p) == sizeof(int*));
}
int main()
{
int array[2] = { 7, 42 };
as_array(array);
// Decays to pointer to first member
as_pointer(array);
}
Ali
------------------------------
Date: Fri, 23 May 2008 14:17:28 -0700 (PDT)
From: grocery_stocker <cdalten@gmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <25dad38d-0e82-4c19-b9c2-f6a198a2be35@q24g2000prf.googlegroups.com>
On May 23, 10:48 am, grocery_stocker <cdal...@gmail.com> wrote:
> How are references and aliases in perl different than references in
> aliases in C++?
And going off on a tanget, given something like
#!/usr/bin/perl -w
# global array definition
my @array = ("a","b","c");
sub print_array {
foreach my $element (@array) {
$element .= "9";
print $element . "\n";
}
}
for ($i = 0; $i < 3; $i++) {
&print_array();
}
How would I prevent $elment from modifying @array?
------------------------------
Date: Fri, 23 May 2008 22:13:52 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <Xns9AA7B974D6DACasu1cornelledu@127.0.0.1>
grocery_stocker <cdalten@gmail.com> wrote in news:25dad38d-0e82-4c19-
b9c2-f6a198a2be35@q24g2000prf.googlegroups.com:
> On May 23, 10:48 am, grocery_stocker <cdal...@gmail.com> wrote:
>> How are references and aliases in perl different than references in
>> aliases in C++?
>
> And going off on a tanget, given something like
>
> #!/usr/bin/perl -w
use warnings;
is in general preferable to -w.
You forgot:
use strict;
> # global array definition
Useless comment (it is also wrong).
> my @array = ("a","b","c");
my @array = qw( a b c ); # easier on the eyes
> sub print_array {
> foreach my $element (@array) {
> $element .= "9";
> print $element . "\n";
> }
>
> }
>
> for ($i = 0; $i < 3; $i++) {
> &print_array();
> }
First off, omit the & unless you know and desire its specific effect in
this case.
> How would I prevent $elment from modifying @array?
$element is not modifying anything. $element is an alias to the current
element of @array. The statement you wrote
$element .= "9";
is modifying the contents of @array in each iteration of the loop.
The easiest way to avoid modifying the contents of @array would be for
you not to modify the contents of the array.
The name print_array is simply bad. The subroutine does not just print
the contents of the array but prints some modification of the elements
of the array.
Depending on what you actually want to do, there are many different ways
of writing such a subroutine (each of which is infinitely better than
what you wrote).
Some examples below. Some of these are sillier than the others.
#!/usr/bin/perl
use strict;
use warnings;
my @array = qw( a b c d e f g h i j k l );
my %hash = @array;
print "${_}9\n" for @array;
print map { "${_}9\n" } @array;
print_with_suffix( 9 => \@array );
print_with_suffix2( 9 => @array, \@array, \%hash );
sub print_with_suffix {
my ($suffix, $array_ref) = @_;
return unless ref $array_ref eq 'ARRAY';
print "${_}$suffix\n" for @$array_ref;
}
sub print_with_suffix2 {
my $suffix = shift;
for my $arg ( @_ ) {
if ( ref $arg eq 'ARRAY' ) {
print_with_suffix( $suffix, $arg );
}
elsif ( ref $arg eq 'HASH' ) {
print_with_suffix( $suffix, [ values %$arg ] );
}
else {
print "$arg$suffix\n";
}
}
}
__END__
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Fri, 23 May 2008 15:22:52 -0700 (PDT)
From: grocery_stocker <cdalten@gmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <d257662e-f5c8-4867-b9be-512ee20d8210@p39g2000prm.googlegroups.com>
On May 23, 3:13 pm, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> grocery_stocker <cdal...@gmail.com> wrote in news:25dad38d-0e82-4c19-
> b9c2-f6a198a2b...@q24g2000prf.googlegroups.com:
>
> > On May 23, 10:48 am, grocery_stocker <cdal...@gmail.com> wrote:
> >> How are references and aliases in perl different than references in
> >> aliases in C++?
>
> > And going off on a tanget, given something like
>
> > #!/usr/bin/perl -w
>
> use warnings;
>
> is in general preferable to -w.
>
> You forgot:
>
> use strict;
>
> > # global array definition
>
> Useless comment (it is also wrong).
>
> > my @array = ("a","b","c");
>
> my @array = qw( a b c ); # easier on the eyes
>
> > sub print_array {
> > foreach my $element (@array) {
> > $element .= "9";
> > print $element . "\n";
> > }
>
> > }
>
> > for ($i = 0; $i < 3; $i++) {
> > &print_array();
> > }
>
> First off, omit the & unless you know and desire its specific effect in
> this case.
>
> > How would I prevent $elment from modifying @array?
>
> $element is not modifying anything. $element is an alias to the current
> element of @array. The statement you wrote
>
> $element .= "9";
>
> is modifying the contents of @array in each iteration of the loop.
>
> The easiest way to avoid modifying the contents of @array would be for
> you not to modify the contents of the array.
>
> The name print_array is simply bad. The subroutine does not just print
> the contents of the array but prints some modification of the elements
> of the array.
>
> Depending on what you actually want to do, there are many different ways
> of writing such a subroutine (each of which is infinitely better than
> what you wrote).
>
> Some examples below. Some of these are sillier than the others.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my @array = qw( a b c d e f g h i j k l );
> my %hash = @array;
>
> print "${_}9\n" for @array;
>
> print map { "${_}9\n" } @array;
>
> print_with_suffix( 9 => \@array );
>
> print_with_suffix2( 9 => @array, \@array, \%hash );
>
> sub print_with_suffix {
> my ($suffix, $array_ref) = @_;
> return unless ref $array_ref eq 'ARRAY';
> print "${_}$suffix\n" for @$array_ref;
>
> }
>
> sub print_with_suffix2 {
> my $suffix = shift;
>
> for my $arg ( @_ ) {
> if ( ref $arg eq 'ARRAY' ) {
> print_with_suffix( $suffix, $arg );
> }
> elsif ( ref $arg eq 'HASH' ) {
> print_with_suffix( $suffix, [ values %$arg ] );
> }
> else {
> print "$arg$suffix\n";
> }
> }
>
> }
>
> __END__
>
> --
> A. Sinan Unur <1...@llenroc.ude.invalid>
> (remove .invalid and reverse each component for email address)
>
> comp.lang.perl.misc guidelines on the WWW:http://www.rehabitation.com/clpmisc/
I see. Thanks
------------------------------
Date: Fri, 23 May 2008 22:35:16 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <ifhe34di0hm9vahvc4jhg4lm2omc93gh8t@4ax.com>
grocery_stocker <cdalten@gmail.com> wrote:
[...]
>my @array = ("a","b","c");
[...]
> foreach my $element (@array) {
> $element .= "9";
[...]
>How would I prevent $elment from modifying @array?
$element doesn't modify anything. If at all it is modified by the
assignment and because it is an alias to to each @array element those
are modified, too.
Solution: just create a copy:
my @array = ("a","b","c");
[...]
foreach (@array) {\
my $element = $_ # create copy instead of aliasing
$element .= "9";
jue
------------------------------
Date: Fri, 23 May 2008 22:44:18 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: reference/alias in perl vs reference/alias in C++
Message-Id: <Xns9AA7BE9D4D4FEasu1cornelledu@127.0.0.1>
grocery_stocker <cdalten@gmail.com> wrote in
news:7e2f37b0-b75a-4f1e-b6d4-58c93a5d12ea@q27g2000prf.googlegroups.com:
> On May 23, 12:22 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
>> In article
>> <8f8a7081-f03a-4063-9999-36ba6dd16...@u12g2000prd.googlegroups.com>,
>>
>> grocery_stocker <cdal...@gmail.com> wrote:
>> > How are references and aliases in perl different than references in
>> > aliases in C++?
>>
[ snip Jim's explanation ]
>> --
>> Jim Gibson
[ Do *NOT* quote sigs ]
> Everytime I ask a question on the newsgroup, i keep on thinking "I'm
> sure things would have been a lot easier if I would have taken more
> than 6 week of FORTRAN."
I did do some FORTRAN programming almost 20 years ago. I am not sure
what you are getting at though.
> I don't care what anyone says.
Well, I am reminded of
http://www.catb.org/~esr/faqs/hacker-howto.html#believe5
> Learning to program on your own.
http://en.wikipedia.org/wiki/Sentence_%28linguistics%29
> mastering the core concepts without formal
> schooling, and then actually making it as a programmer takes a certain
> level of skill and internal drive.
Are you referring to yourself here?
I am not sure what "making it as a programmer" means above. On the other
hand, almost everyday at work is an opportunity for me to run into
someone who thinks he/she has made it as a programmer. I am not sure I
agree with those people's self-assessments.
> Not everyone has it.
True.
> I think I only know a few people with no more than a high school
> education that are doing the same kind of work, for the exact same
> pay, as a person with an advanced degree in the sciences.
The only thing that shows me is that the person with the advanced degree
in the sciences has chosen not to work in the field in which he/she
earned the degree.
Clearly, once one has a certain mental capability, whether one chooses
to invest time in an advanced degree is a matter of preference. Another
person with even superior mental capacity may choose not to "waste" five
to seven years toiling on a project which is of interest to only a few
people and which, as a norm, do not generate huge monetary returns on
that investment. This is why I do not put much stock in letters before
or after a person's name.
Achieving that goal also takes a certain level of skill and drive.
If I were you, I would not be so quick to pat myself on the back for
this particular reason until I were able to compete with Physics Ph.D.'s
in the fields in which they earned their degrees.
You can be proud of your achievements without resorting to this silly
argument.
Switching back to discussing Perl ... now.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1573
***************************************