Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Practical Extraction Recording Language

6 views
Skip to first unread message

A. Sinan Unur

unread,
Oct 24, 2004, 1:25:36 AM10/24/04
to

Uri Guttman

unread,
Oct 24, 2004, 2:12:54 AM10/24/04
to
>>>>> "ASU" == A Sinan Unur <us...@llenroc.ude.invalid> writes:

ASU> Just for laughs:
ASU> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8

The following elements are symbols and special variables that
are very important in Perl. You should know and understand the
function of these. They are special and have been set aside for
specific use by the program.

#! - This symbol tells the kernel what program is
interpreting the script. It will be followed by the path
name. In our case, the first line of every Perl script will
be #!/usr/bin/perl.

hahahhahah!!!! what a wacked out explanation of #!. first he says it is
a perl symbol and then he says it is used by the kernel.

; - The semicolon is the part of Perl language that terminates a
statement. A perl statement is an expression or series of
expressions that will not be executed without the semicolon.

huh??? perl -e 'print "the author is a doofus\n"'

don't see no ; there!

Chop or Chomp ? The chop and chomp function take off the last
character of a string or variable. For our intents and purposes,
they can be used interchangeably. They are usually used to take
off the return of a standard input (from the keyboard) so that
it is not read as part of a variable.

this is getting worse and worse. where do these perl tutorial authors
get their nonsense from? it just supports my creed that almost all perl
web tutes are crap. i can still only think of a handful (from dozens!)
that are decent.

Defined Expression ? The defined function returns a Boolean
value of 1 when an expression has a real value and 0 when it
does not. It allows you to check the validity of variables. This
is useful for understanding where a fatal error is coming from.

????? if it is a fatal error, how can defined even get called?

Die ? The die function is used if a call to open function
fails. For instance, if the user types the wrong file name for
the data file that is being filtered, a die function can be used
to stop the program from progressing. It exits the Perl script
with the value of $! and prints a message to the STDERR.

hmm, die can only be used with open?

Evaluate ? The eval function allows the user to check for errors
in the Perl script. It evaluates an expression and the errors
are returned to the $@ variable.

hmm, conflating eval string vs eval block. i wouldn't have expected
anything else from this page.

Join ? The join function converts a LIST of variables to an
array separated by a delimiter specified by EXPR.

that is a winner!

plenty of more poorly worded stuff. then i find this gem:

Quotes effect almost everything you do in Perl and are used
especially when printing a string of words. The three kinds of
quotes are single (' '), double (" "), or backslashes (\ \).

backslashes are quotes? and in pairs? can someone point me to the docs
for this? more on this:

Backslashes can be used only to quote a single character. A
single backslash can be used to tell the program not to read a
special Perl character as such. For instance, if you want to use
a dollar sign in your output, you would put \$ in your script so
that Perl would not think you were introducing a variable.

wow. print \$foo ;

there is no mention of context anywhere especially for those funcs and
ops where it matters (e.g. check out reverse)


These terms along and much of the material in this Perl Tutorial
can be found in the book Perl by Example written by Ellie
Quigley (1995). I have chosen the terms applicable to scientific
data filtering using Perl in an attempt to facilitate
learning. This tutorial was written for the participants of the
National Science Foundation grant REVITALISE for educational
purposes only.

that is an infamously bad perl book and amazingly out of date. so he
plagiarized a bad book and was paid for it?

Links:

ActiveState - This link will take you to ActiveState's Perl
page. Here you can download the correct version of Perl for
your machine as well as find a plethora of other useful
information.

so activestate is the center of the perl universe. that is the only link
in that section. and consider that the #! crap is unix only but he
refers to a winblows oriented perl (yes, i know they have unix versions
but who uses those?).

it opens with:

Lindsay Husted, presently an undergraduate at the University of
North Carolina and an NSF appointee, built this site.

the last modified time is:

06/16/04 15:20:44

this page is mind boggling. if someone can find an email address, feel
free to forward my critique.

uri

--
Uri Guttman ------ u...@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org

Ala Qumsieh

unread,
Oct 24, 2004, 2:30:31 AM10/24/04
to
Uri Guttman wrote:

>>>>>>"ASU" == A Sinan Unur <us...@llenroc.ude.invalid> writes:
>
>
> ASU> Just for laughs:
> ASU> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8

[snip valid critique]

> this page is mind boggling. if someone can find an email address, feel
> free to forward my critique.

I'm totally surprised you actually went through the whole page! I just
couldn't go on after the first few paragraphs. Things like this should
be illegal!

DIRHANDLE - This is the name of the directory.

huh?

KEY - The numeric identification assigned to each element of an
associative array (usually starts at one and counts up).
VALUE - The non-numeric identification assigned to each element of
an associative array.

So keys have to be numeric and values have to be non-numeric? Later on,
he (fortunately) contradicts himself:

ASSOC - A variable that contains a list of values that is indexed by
a string. It is preceded by the % symbol. Its individual elements are
scalar.

STRING - Non-numerical variable (perhaps a list of words)

Why non-numeric?

I just couldn't go on any further. The worst Perl tutorial I've seen by far.

--Ala

Anno Siegel

unread,
Oct 24, 2004, 4:12:50 AM10/24/04
to
Ala Qumsieh <notv...@email.com> wrote in comp.lang.perl.misc:

> Uri Guttman wrote:
>
> >>>>>>"ASU" == A Sinan Unur <us...@llenroc.ude.invalid> writes:
> >
> >
> > ASU> Just for laughs:
> > ASU> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8
>
> [snip valid critique]
>
> > this page is mind boggling. if someone can find an email address, feel
> > free to forward my critique.
>
> I'm totally surprised you actually went through the whole page! I just
> couldn't go on after the first few paragraphs. Things like this should
> be illegal!

What I find fascinating is how the author combines incompetence with
the tone of authority. The young woman ("Lindsay Husted, presently an
undergraduate...") obviously writes about things she doesn't understand.
But no sign of insecurity enters the writing even at its most nonsensical.

At some point, incompetence impairs a person's ability to perceive it.

Anno

Tintin

unread,
Oct 24, 2004, 4:52:07 AM10/24/04
to

"Uri Guttman" <u...@stemsystems.com> wrote in message
news:x7wtxgb...@mail.sysarch.com...

> Lindsay Husted, presently an undergraduate at the University of
> North Carolina and an NSF appointee, built this site.
>
> the last modified time is:
>
> 06/16/04 15:20:44
>
> this page is mind boggling. if someone can find an email address, feel
> free to forward my critique.


See http://www.unc.edu/~husted/Contactme.htm


Octo Mancer

unread,
Oct 24, 2004, 5:30:40 AM10/24/04
to
On Sun, 24 Oct 2004 08:12:50 +0000, Anno Siegel wrote:
> What I find fascinating is how the author combines incompetence with
> the tone of authority. The young woman ("Lindsay Husted, presently an
> undergraduate...") obviously writes about things she doesn't understand.
> But no sign of insecurity enters the writing even at its most nonsensical.

I agree. There is never any hint in the writing that the author knows they
are creating the most dangerous kind of instruction - half truth mixed
with complete tosh (reminiscent of some religious texts).

My personal favourite:

"It uses a combination of shell, awk, sed, grep, and C languages. It was
created by Larry Wall and is a GNU product, which means it is FREE."

I challenge anyone to cram so many fallacies into so few words!!! This
sentence caused me to think the whole page was intentional comedy, but by
the end of the next section the horrible truth had dawned.

R

A. Sinan Unur

unread,
Oct 24, 2004, 8:15:49 AM10/24/04
to
anno...@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
news:clfo62$d2l$1...@mamenchi.zrz.TU-Berlin.DE:

> At some point, incompetence impairs a person's ability to perceive it.

Speaking of which: http://www.apa.org/journals/psp/psp7761121.html

Sinan.

Uri Guttman

unread,
Oct 24, 2004, 10:43:17 AM10/24/04
to
>>>>> "AS" == Anno Siegel <anno...@lublin.zrz.tu-berlin.de> writes:

AS> What I find fascinating is how the author combines incompetence
AS> with the tone of authority. The young woman ("Lindsay Husted,
AS> presently an undergraduate...") obviously writes about things she
AS> doesn't understand. But no sign of insecurity enters the writing
AS> even at its most nonsensical.

AS> At some point, incompetence impairs a person's ability to perceive it.

i did find a page of contacts for the 'leaders' of this 'revitalize'
program and sent an email to the one from her school. i eagerly await an
answer (got a vacation reply so it is valid!). that this was funded by
the NSF was the biggest insult. they should just pour money into TPF
instead.

and as someone else said this is about the worst perl tute i have ever
seen. it is so wrong in so many ways. we should keep an archive copy
around before the author deletes it (now that is has been discovered by
the real perl community and ridiculed).

el_roac...@yahoo.com

unread,
Oct 24, 2004, 2:00:52 PM10/24/04
to
As someone who has been programming in perl for several years, I found
the site useful. It was simple and well organized and I picked up
several new tips to add to my "arsenal". Yeah, it may not be 100%
accurate, but perl is about getting the job done, not about splitting
hairs.

Next time you insult someone's work, why dont you post a link of your
own tutorial? Don't have one, I didnt think so.

"A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message news:<Xns958CE837A2D...@132.236.56.8>...

A. Sinan Unur

unread,
Oct 24, 2004, 2:43:04 PM10/24/04
to
el_roac...@yahoo.com wrote in
news:5d705481.04102...@posting.google.com:

[ top posting corrected ... please do not do that
It seems like it is your first time posting here so
please go ahead and read the posting guidelines.
]

> "A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message
> news:<Xns958CE837A2D...@132.236.56.8>...
>> Just for laughs:
>>
>> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8

> As someone who has been programming in perl for several years, I found
> the site useful.

If that is the case, then you might find http://learn.perl.org/ even
more useful.

Sinan.

Tad McClellan

unread,
Oct 24, 2004, 2:51:10 PM10/24/04
to
Uri Guttman <u...@stemsystems.com> wrote:
>>>>>> "ASU" == A Sinan Unur <us...@llenroc.ude.invalid> writes:
>
> ASU> Just for laughs:
> ASU> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8

> ; - The semicolon is the part of Perl language that terminates a
> statement. A perl statement is an expression or series of
> expressions that will not be executed without the semicolon.
>
> huh??? perl -e 'print "the author is a doofus\n"'
>
> don't see no ; there!


Just so that we might realize some practical value from shredding
the bullshit that is that "reference" page, let's learn about the role
of semicolon.

In most languages the semicolon is a "statement terminator" so it
must terminate each statement.

It is not like that in Perl.

In Perl the semicolon is a "statement separator" so it is only
needed when you have 2 statements that need "separating".

This is why the final semicolon in any block is optional in Perl.
You leave it off at the end, or if you put it in, you are really
inserting an "empty statement" (which has no effect) after the
final (visible) statement.


> this page is mind boggling.


It really packed in the grins-per-sentence, I feel better after
a humor break like that.

Thanks for posting the link Sinan, it was a real hoot!


--
Tad McClellan SGML consulting
ta...@augustmail.com Perl programming
Fort Worth, Texas

A. Sinan Unur

unread,
Oct 24, 2004, 3:03:45 PM10/24/04
to
Tad McClellan <ta...@augustmail.com> wrote in
news:slrncnnucu...@magna.augustmail.com:

> Thanks for posting the link Sinan, it was a real hoot!

You are welcome. I had googled for something and it came up second or third
so I decided to follow the link. It took a while for my initial reaction to
subside and then I realized it might be appreciated over here.

Sinan.

krakle

unread,
Oct 24, 2004, 3:41:39 PM10/24/04
to
"A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message news:<Xns958CE837A2D...@132.236.56.8>...

A great college education UNC offers...

Abigail

unread,
Oct 24, 2004, 7:04:12 PM10/24/04
to
Uri Guttman (u...@stemsystems.com) wrote on MMMMLXXII September MCMXCIII
in <URL:news:x7wtxgb...@mail.sysarch.com>:

||
|| this page is mind boggling. if someone can find an email address, feel
|| free to forward my critique.


Three seconds with google gave me:
http://www.unc.edu/~husted/Contactme.htm, which has two of her email
addresses.


Abigail
--
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail

Matt Garrish

unread,
Oct 24, 2004, 11:53:15 PM10/24/04
to

<el_roac...@yahoo.com> wrote in message
news:5d705481.04102...@posting.google.com...

> "A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message
> news:<Xns958CE837A2D...@132.236.56.8>...
>> Just for laughs:
>>
>> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8
>>
> As someone who has been programming in perl for several years, I found
> the site useful. It was simple and well organized and I picked up
> several new tips to add to my "arsenal". Yeah, it may not be 100%
> accurate, but perl is about getting the job done, not about splitting
> hairs.
>

Care to elaborate on what you found useful on that site?

>
> Next time you insult someone's work, why dont you post a link of your
> own tutorial? Don't have one, I didnt think so.
>

The people who post here know better than to rewrite the docs, but if you
really like links:

www.perldoc.com

Starting people off with false information and bad coding practices in the
interest of not "splitting hairs" is not justification for writing a bad
tutorial. It's harder to break a bad habit than to learn something right the
first time. Worse, someone who believes information like that is
authoritative may not discover for a long time just how uninformed they are.

Matt


Uri Guttman

unread,
Oct 25, 2004, 12:57:04 AM10/25/04
to
>>>>> "ASU" == A Sinan Unur <us...@llenroc.ude.invalid> writes:

ASU> Tad McClellan <ta...@augustmail.com> wrote in
ASU> news:slrncnnucu...@magna.augustmail.com:

>> Thanks for posting the link Sinan, it was a real hoot!

ASU> You are welcome. I had googled for something and it came up
ASU> second or third so I decided to follow the link. It took a while
ASU> for my initial reaction to subside and then I realized it might
ASU> be appreciated over here.

thanx from me too. i enjoy shredding pages like that. i do code review
for work when i can and doc review is similar. i wouldn't have the
energy to write a proper tute/book (and there are good ones out there)
but it is much easier to do critiques. this was the easiest critique i
have ever done. i was having trouble finding stuff that didn't have
blatant errors or stupidities.

Uri Guttman

unread,
Oct 25, 2004, 12:59:47 AM10/25/04
to
>>>>> "er" == el roachmeister <el_roac...@yahoo.com> writes:

er> As someone who has been programming in perl for several years, I found
er> the site useful. It was simple and well organized and I picked up
er> several new tips to add to my "arsenal". Yeah, it may not be 100%
er> accurate, but perl is about getting the job done, not about splitting
er> hairs.

100%?? more like it was right about 20%. the mistakes and errors and
misstatements were legion. the organization made no sense (like i said,
context was never mentioned).

er> Next time you insult someone's work, why dont you post a link of
er> your own tutorial? Don't have one, I didnt think so.

why? there are several good ones out amongst the dozens of bad ones. it
would be better to point newbies to the good ones (and ridiculing the
bad ones) rather than writing one.

Tintin

unread,
Oct 25, 2004, 2:29:31 AM10/25/04
to

<el_roac...@yahoo.com> wrote in message
news:5d705481.04102...@posting.google.com...
> As someone who has been programming in perl for several years, I found
> the site useful. It was simple and well organized and I picked up
> several new tips to add to my "arsenal". Yeah, it may not be 100%
> accurate, but perl is about getting the job done, not about splitting
> hairs.

Virtually all programming languages are precise in their syntax. You just
can't use random stuff and expect it to work.

What happens when a novice Perl programmer comes along a read a tutorial
that's full of errors, misinformation and misleading statements. That's
hardly going to enable them to "gettting the job done".


Richard Williams

unread,
Oct 25, 2004, 7:41:10 AM10/25/04
to
In article <x7wtxgb...@mail.sysarch.com>,
Uri Guttman <u...@stemsystems.com> wrote:

>this page is mind boggling. if someone can find an email address, feel
>free to forward my critique.

You can contact her via a link on her homepage:

http://www.unc.edu/~husted/


Richard.

Peter Wyzl

unread,
Oct 25, 2004, 8:06:10 AM10/25/04
to
"A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message
news:Xns958CE837A2D...@132.236.56.8...

Since the tutorial has been critiqued widely, perhaps some of her code
too...

From http://www.unc.edu/~husted/Work/password.txt#!/usr/bin/perl
#Lindsay Husted
#password.pl
#July 10, 2003
#this program generates a random password
#
#Generate a random number
print "Enter a seed number: ";
$seed = <STDIN>;
chomp $seed;
srand($seed ^ time);
#Set up a list of consonants and vowels
@consonants= split(/ */, "bcdfghjklmnpqrstvwxyz");
@vowels= split (/ */, "\@310u");
#Loop through the generation of a password
for ($i=1; $i<=4; $i +=1) {
print $consonants[int(rand(21))],
$vowels[int(rand(5))];
}
#EOFFrom http://www.unc.edu/~husted/Work/literals.perl.txt#!/usr/bin/perl
#Program, named literals.perl, written to test special literals
print "We are on line number ",__LINE__,".\n"; #Returns line number
print "The name of this file is ",__FILE__,".\n"; #Returns file name
__END__

#Must use a double underscore at the front and back of the word
_____-- Wyzelli${^__}=[qw(Just another Perl Hacker)];print "@{[@{${^__}}]}";


A. Sinan Unur

unread,
Oct 25, 2004, 9:37:39 AM10/25/04
to
"Peter Wyzl" <wyz...@yahoo.com> wrote in
news:S_5fd.38800$5O5....@news-server.bigpond.net.au:

> "A. Sinan Unur" <us...@llenroc.ude.invalid> wrote in message
> news:Xns958CE837A2D...@132.236.56.8...
>> Just for laughs:
>>
>> http://www.unc.edu/~husted/Work/PerlReference.htm#anchor8
>
> Since the tutorial has been critiqued widely, perhaps some of her code
> too...

Why not try it yourself. At each line, ask if ther is a better way to do
it.

> #Generate a random number
> print "Enter a seed number: ";
> $seed = <STDIN>;
> chomp $seed;
> srand($seed ^ time);

Since the user cannot reproduce the same password even when she knows the
seed, what is the use of asking the user to enter the seed. Either the
seed should be used unmodified (as a forgotten password retrieval
mechanism, maybe?) or the default seed should be used. See Abigail's
responses in http://tinyurl.com/6npm6.

So, the script needs to start with:

use strict;
use warnings;

> #Set up a list of consonants and vowels
> @consonants= split(/ */, "bcdfghjklmnpqrstvwxyz");

There is no point to this, really.

my @consonants= qw'b c d f g h j k l m n p q r s t v w x y z';

On the other hand, if one just has to use split, say what you mean:

my @consonants= split //, 'bcdfghjklmnpqrstvwxyz';

> @vowels= split (/ */, "\@310u");

Same deal.

my @vowels= qw'@ 3 1 0 u';

> #Loop through the generation of a password
> for ($i=1; $i<=4; $i +=1) {
> print $consonants[int(rand(21))],
> $vowels[int(rand(5))];
> }

Since the loop index is not used at all, this can be written as:

print $consonants[int(rand(21))], $vowels[int(rand(5))] for (1 .. 4);

However, 'z' will never be picked in this scheme.

Sinan.

Michele Dondi

unread,
Oct 25, 2004, 10:36:16 AM10/25/04
to
On 24 Oct 2004 11:00:52 -0700, el_roac...@yahoo.com wrote:

>As someone who has been programming in perl for several years, I found
>the site useful. It was simple and well organized and I picked up
>several new tips to add to my "arsenal". Yeah, it may not be 100%
>accurate, but perl is about getting the job done, not about splitting
>hairs.

Huh?!? You're joking, aren't you?

Tell the truth: she's your girlfriend... eh?


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Michele Dondi

unread,
Oct 25, 2004, 6:35:29 PM10/25/04
to
On Sun, 24 Oct 2004 09:30:40 GMT, Octo Mancer <ric...@zync.co.uk>
wrote:

<TotallyOT>


>I challenge anyone to cram so many fallacies into so few words!!! This

Well this is completely OT wrt not only the subject of this thread,
but even wrt Perl at all... however many years ago, in secondary
school, our biology teacher brought us to the lab where we saw a
couple of old, and I say *old* educational movies, probably from the
sixties. To give an idea we were studying invertebrates at that time,
I clearly remember that one of this movies was still classifying
bacteria amongst plantae.

Since the movies ended before the hour was complete, she began showing
slides more or less at random, mostly having nothing to do with
invertebrates. At a certain point a philogenetic tree of the genre
homo came out, and it could have been fine, had she only shown it
(although AFAIK it was a now outdated model of human evolution). But
she dared to add, as an explanation(?) her reading of the tags that we
could see ourselves. At a certain point she came out with "Here, you
see, we have HOMUS AFARENSIS".
^^^^^^^^^^^^^^^

Well, I'd say that this counts three errors in two words: (i) reading,
for there was clearly written "A. Afarensis", (ii) Latin, for it is
homo/hominis, not homus/homii, (iii) classification, in fact it/he
(she? - Remember "Lucy"?) is a member of the genre Australopithecus,
not Homo...
</TotallyOT>

0 new messages