On Tuesday, August 20, 2002, at 12:34  PM, Derek D. Martin wrote:

> You still seem to be missing the point.  Certainly, proficiency plays
> a role.  But the point is that there is no meaning inherent in $!
> (the use of which BTW, I have no idea, despite having seen and I'm
> pretty sure even used)...

This is a good point, one that I would like to make a point about:

"there is no meaning inherent in $!"

Right.  Just like there is no meaning inherent in #! but we all know 
what it means when it comes at the top of a script.  Similarly there is 
no meaning inherent in the word "Perl", but through convention we have 
come to associate it with something.  The word "Perl" is nothing more 
than a signifier, it's a simple sign.  It doesn't have any meaning 
outside of that which we bring to it.  I look at that word and it says 
"swiss army chainsaw", someone else looks at it and says "line noise", 
someone else looks at it and says "misspelled word for round gemstone 
found in oysters".

But because $! has been used hundreds of times to echo an error code, I 
look at that now and it's the first thing that I think of.  Just like !$ 
means "final argument to previous command" in bash.

> Even were I to use Perl regularly, I would have a hard time
> remembering which was which, and hence avoid them whenever possible.
> They do not lend themselves to being learned, and I've never been good
> at memorizing.

I think Programming Perl does a decent job of providing mnemonics for 
most of those variables.  Here are some:

$scalarname - "$" is an "s" for "scalar"
@arrayname - "@" is an "a" for "array"
%hashname - "%" has two circles with a line between them, like a 
key-value pair
$@ - Currently raised exception/syntax error message from last eval, 
"where was the syntax error -at-?"
/x - "x" for "extended" regular expression modifier
/g - "g" for "global" regular expression modifier
$= - current page length of selected output file handle, "= has 
horizontal lines"
$- - number of lines left on page of currently selected output file 
handle, "what's left after subtracting the lines already used"
$^ - the name of the current top-of-page format for currently selected 
output file handle, "the ^ points to the top of the page"

Yeah, some are a stretch.  But you don't have to use them, they're there 
if you want them.

> Programming languages manipulate data, very often involving multiple
> types of information; data structures.  This is a fundamental part of
> programming, so much so that it's taught to all first year CS
> students.  Perl makes manipulating data structures harder than it
> needs to be.  IMO, this is a weakness of Perl.

I agree.  I'd rather use an object-based data structure than a hash of 
hashes or something.  Perl's great for finding data, but to do more 
complex stuff with the data once its found, sometimes there are better 
tools.

> I like perl.  It makes shell scripting easier.  =8^)

That's a good way to sum it up.




Erik





--
Erik Price

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]

_______________________________________________
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss

Reply via email to