[15792] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3205 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 30 11:05:25 2000

Date: Tue, 30 May 2000 08:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959699110-v9-i3205@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 30 May 2000     Volume: 9 Number: 3205

Today's topics:
    Re: Basic scripting question <godzilla@stomp.stomp.tokyo>
    Re: Basic scripting question <nospam@devnull.com>
        BO's in Perl? jdimov@my-deja.com
        can somebody help me in this program!! <arun67@yahoo.com>
    Re: can somebody help me in this program!! <care227@attglobal.net>
    Re: can somebody help me in this program!! <andkaha@my-deja.com>
    Re: can somebody help me in this program!! <godzilla@stomp.stomp.tokyo>
    Re: can somebody help me in this program!! <red_orc@my-deja.com>
        generating WML <wouter@quicknet.nl>
    Re: help newbie : how to count line into a txt file <uackermann@orga.com>
    Re: help newbie : how to count line into a txt file <red_orc@my-deja.com>
        HELP: how use '\<CRs>' with "perl -e" in a shell pipe ? monsri@my-deja.com
    Re: Is Perl for me? <zigouras@mail.med.upenn.edu>
    Re: Is Perl for me? <robert@pharmapartners.nl>
    Re: Is Perl for me? <care227@attglobal.net>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: oops Re: seeking method to encode email addresses i <godzilla@stomp.stomp.tokyo>
    Re: oops Re: seeking method to encode email addresses i <nospam@devnull.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 30 May 2000 06:16:13 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Basic scripting question
Message-Id: <3933BF1D.9B92EFC1@stomp.stomp.tokyo>

The WebDragon wrote:
 
> In article <392EA783.43A11A30@stomp.stomp.tokyo>, "Godzilla!"
> <godzilla@stomp.stomp.tokyo> wrote:
 
>  | The WebDragon wrote:
>  | >
>  | > "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>  |
>  | >  | Except for one thing; it doesn't work right.
>  |
>  | > not only does it work, but it even works on MY MACINTOSH
>  |
>  | > *smiles sweetly.. gradually morphing into a maniacal grin*
>  |
>  | Review the entire thread on this code
>  | in question Mr. Dragon. I believe you
>  | have a bassackwards notion on this.
 
> Heya Godzilla,
 
> Um, 'fraid not.
 
Yeah, sure. So you finally worked up enough
courage to return and go at it again eh? Darn,
'bout time. These people around here are totally
gag me with a spoon boring.

Clearly you didn't notice his code works
backwards. It does precisely the opposite
of what he says it does. Of course he gets
complimented all to Hell for writing such
eloquent bad code. All to Hell, fitting.

That's frayed knot. You know better than to
use bad English around me.

You still want me to be the systems operator
for your sites or is this offer de funk now?

Godzilla!


------------------------------

Date: 30 May 2000 14:12:59 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Basic scripting question
Message-Id: <8h0i9b$kvb$1@216.155.32.164>

In article <3933BF1D.9B92EFC1@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

 | The WebDragon wrote:
 |  
 | > In article <392EA783.43A11A30@stomp.stomp.tokyo>, "Godzilla!"
 | > <godzilla@stomp.stomp.tokyo> wrote:
 |  
 | >  | The WebDragon wrote:
 | >  | >
 | >  | > "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
 | >  |
 | >  | >  | Except for one thing; it doesn't work right.
 | >  |
 | >  | > not only does it work, but it even works on MY MACINTOSH
 | >  |
 | >  | > *smiles sweetly.. gradually morphing into a maniacal grin*
 | >  |
 | >  | Review the entire thread on this code
 | >  | in question Mr. Dragon. I believe you
 | >  | have a bassackwards notion on this.
 |  
 | > Heya Godzilla,
 |  
 | > Um, 'fraid not.
 |  
 | Yeah, sure. So you finally worked up enough
 | courage to return and go at it again eh? Darn,
 | 'bout time. These people around here are totally
 | gag me with a spoon boring.
 | 
 | Clearly you didn't notice his code works
 | backwards. It does precisely the opposite
 | of what he says it does. Of course he gets
 | complimented all to Hell for writing such
 | eloquent bad code. All to Hell, fitting.

no, in point of fact, I did notice, which is why I included BOTH 
examples.. the one that sucks out every third line and the one that 
SPITS out every third line. 

*looks around at everyone in the room* and NO this is NOT some sort of 
garish pun, no matter how bad it looks. Get your minds out of the gutter!

:D

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


------------------------------

Date: Tue, 30 May 2000 14:43:44 GMT
From: jdimov@my-deja.com
Subject: BO's in Perl?
Message-Id: <8h0k2r$b5q$1@nnrp1.deja.com>



  Are Perl scripts absolutely safe from buffer overflows?  How exactly
does Perl prevent BO's?


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 30 May 2000 13:30:07 GMT
From: Arun Mahajan <arun67@yahoo.com>
Subject: can somebody help me in this program!!
Message-Id: <sj7givju5pj117@corp.supernews.com>

hi everybody,

this is my first ever program and could not understand the problem why it 
is not executing. see i am calling my cgi from the html code and want to 
process it and it gives me internal server error. when i check it on 
command line it gives me following description of errors:-

errors:-
-----------
undefined value assgined to typeglob at cg-lib.pl line 58
undefined value assgined to typeglob at cg-lib.pl line 58
undefined value assgined to typeglob at cg-lib.pl line 58
Use of unintiated value at ./accun-build.cgi at line 6
Can't use an undefined value as filehandler reference at ./accn_build.cgi 6

source code of my html:-
-------------------------------
<html>
<head>
	<title>Custom Computer System from Austin Computer Center</title>
</head>

<body bgcolor="#FFFFFF">
Build Your own Computer<br>
<form method="post" action="/cgi-bin/accn_build.cgi">
<table>
<tr>
<td>CPU</td><td>memory</td><td>Hard Disk</td>
</tr>
<tr>
	<td><select name="cpu">
	<option value="P100">Pentium 100
	<option value="P75">Pentium 75
	<option value="P60">Pentium 60
	<option value="486d66">486 Dx2 66
	</select>
	</td>
	<td><select name="memory">
	<option value="32 MEG">32 meg Memory
	<option value="16 MEG">16 Meg Memory
	<option value="8 MEG">8 Meg Memory
	<option value="4 MEG">4 Meg Memory
	</select>
	</td>
	<td><select name="disk">
	<option value="1 GIG IDE">1 Gig IDE
	<option value="850 IDE">850 meg IDE
	<option value="560 IDE">560 meg IDE
	</select>
	</td>
</tr>
<tr>
<td>Video Card</td><td>Monitor</td><td>CD Rom</td><td>Modem</td>
</tr>
<tr>	
	<td><select name="video">
	<option value="4 MEG">4 meg Card
	<option value="2 MEG">2 Meg Card
	<option value="1 MEG">1 Meg Card
	</select>
	</td>
	<td><select name="monitor">
	<option value="17 INCH">17.28 NI
	<option value="15 INCH">15.28 NI
	<option value="14 INCH">14.28 NI
	</select>
	</td>
	<td><select name="CD-ROM">
	<option value="4X CDROM">Quad Speed
	<option value="2X CDROM">Double Speed
	<option value="NONE">None
	</select>
	</td>
	<td><select name="modem">
	<option value="28.8 MODEM">28.8
	<option value="14.4 MODEM">14.4
	<option value="NONE">NONE
	</select>
	</td>
</tr>
</table>
<input type="submit" value="Get Current Price"><input type="reset">
</form>
</body>
</html>


source code of my prog:-
---------------------------
#!/usr/bin/perl -w
push(@INC, "/cgi-bin");
require("cgi-lib.pl");

&ReadParse(*input);
open($PRICE_FILE, "data.tx");

while (<$PRICE_FILE>) {
    chop;
    ($item, $price) = split(/:/,$_,2);
    $price_list{$item} = $price;
 }

$price = $price-list{$input{'cpu'}};

if ($input{'cpu'} eq "486d66") {
   $computer_name = "486DX2-66";
   $video = "VLB";
   $price += $price_list{$input{'memory'}};
   $memory = $input{'memory'};
 }

else {
    $computer_name = "Pentium";
    $video = "PCI";
    $cache = "256K Cache";
      if ($input{'memory'} ne "8 MEG"){
	$price += $price_list{$input{'memory'}};
            }
     if ($input{'memory'} eq "4 MEG") {
          $memory = "8 MEG";
           }
     else {$memory = $input{'memory'};}

    if($input{'cpu'} eq "P100") {$ptype=100}

    elsif ($input{'cpu'} eq "P75") {$ptype = 75}
    elsif($input{'cpu'} eq "P60") {$ptype=60}

 }

$monitor = $input{'monitor'};
$price += $price_list{$input{'monitor'}};

if($input{'CD-ROM'} ne "NONE"){
       $price += $price_list{$input{'cd-ROM'}};
     
     if($input{'CD-ROM'} eq "2X CDROM") {
         $multimedia="Double Speed multimedia System";
      }
   else{
         $multimedia="Double Speed multimedia System";
      }
  }

if($input{'modem'} ne "NONE") {
     $price += $price-list{$input{'modem'}};
    $modem = $input{'modem'};
  }

$price += $price_list{$input{'disk'}};
$DISK = $input{'disk'};

$price += $price_list{$input{'video'}};
$VIDEO = $input{'video'};

print &Printheader;
#print <$in1>;
print <<"print_tag";
<html>
<head><title>Computation with text file</title>
</head>
<body>
<center>
<table border=5>
<tr>
	<th colspan=2 align=center><h2>${computer_name} $ptype for only 
\$$price</h2>
</tr>
<tr>
	<td><ul><li>$memory of RAM
		<li>$cache
		<li>Enhanced IDE In/Out Controller
		<li>$monitor NIL SVGA Video Card
		<li>$VIDEO $video SVGA Video Card
		<li>$multimedia
	      </ul>
	</td>
	<td><ul><li>1.44 Floopy Drive
		<li>$DISK Hard Drive
		<li>Mouse
		<li>Windows 95
		<li>$modem
	   </ul>
	</td>
</tr>
</table>
</body.
</html>
print_tag

print "This is end of file";

I am sorry for such a long text but could not help it. Hope you people 
could understand. 

my data.txt file is under cgi-bin directory.

Thanks in advance for the help.

regards,

Arun Mahajan

--
Posted via CNET Help.com
http://www.help.com/


------------------------------

Date: Tue, 30 May 2000 10:06:32 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: can somebody help me in this program!!
Message-Id: <3933CAE8.F649B4A7@attglobal.net>

Arun Mahajan wrote:
> errors:-
> -----------
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58

$modem = $input{'modem'}; #<-- line 58

Undef value means that the script sees $input{'modem'} as the 
undefined value, and is complaining about assigning that.

> Use of unintiated value at ./accun-build.cgi at line 6
> Can't use an undefined value as filehandler reference at ./accn_build.cgi 6

open($PRICE_FILE, "data.tx");  #<--- line 6

Does data.tx exist?  You'll never know, since you aren't doing
error checking on all your opens, like such:

open($PRICE_FILE, "data.tx") or die "file not ready to open\n";  

You can also check the return value of the open command for the 
specific error.

One word of advice.  Learn and use CGI.pm.


------------------------------

Date: Tue, 30 May 2000 14:09:20 GMT
From: Andreas Kahari <andkaha@my-deja.com>
Subject: Re: can somebody help me in this program!!
Message-Id: <8h0i1v$9bk$1@nnrp1.deja.com>

In article <sj7givju5pj117@corp.supernews.com>,
  Arun Mahajan <arun67@yahoo.com> wrote:
> hi everybody,
>
> this is my first ever program and could not understand the problem why
it
> is not executing. see i am calling my cgi from the html code and want
to
> process it and it gives me internal server error. when i check it on
> command line it gives me following description of errors:-
>
> errors:-
> -----------
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> Use of unintiated value at ./accun-build.cgi at line 6
> Can't use an undefined value as filehandler reference at
 ./accn_build.cgi 6
[cut]
> source code of my prog:-
> ---------------------------
> #!/usr/bin/perl -w
> push(@INC, "/cgi-bin");
> require("cgi-lib.pl");

Isn't cgi-lib.pl old?

>
> &ReadParse(*input);

Do you really mean '*'?

> open($PRICE_FILE, "data.tx");

No $ on handles:
open(PRICE_FILE, "data.tx"); # should that be "data.txt"?

>
> while (<$PRICE_FILE>) {

while (<PRICE_FILE>) {

>     chop;
>     ($item, $price) = split(/:/,$_,2);
>     $price_list{$item} = $price;
>  }
>
> $price = $price-list{$input{'cpu'}};

$price_list instead of $price-list

>
> if ($input{'cpu'} eq "486d66") {
>    $computer_name = "486DX2-66";
>    $video = "VLB";
>    $price += $price_list{$input{'memory'}};
>    $memory = $input{'memory'};
>  }
>
> else {
>     $computer_name = "Pentium";
>     $video = "PCI";
>     $cache = "256K Cache";
>       if ($input{'memory'} ne "8 MEG"){
> 	$price += $price_list{$input{'memory'}};
>             }
>      if ($input{'memory'} eq "4 MEG") {
>           $memory = "8 MEG";
>            }
>      else {$memory = $input{'memory'};}
>
>     if($input{'cpu'} eq "P100") {$ptype=100}
>
>     elsif ($input{'cpu'} eq "P75") {$ptype = 75}
>     elsif($input{'cpu'} eq "P60") {$ptype=60}
>
>  }
>
> $monitor = $input{'monitor'};
> $price += $price_list{$input{'monitor'}};
>
> if($input{'CD-ROM'} ne "NONE"){
>        $price += $price_list{$input{'cd-ROM'}};
>
>      if($input{'CD-ROM'} eq "2X CDROM") {
>          $multimedia="Double Speed multimedia System";
>       }
>    else{
>          $multimedia="Double Speed multimedia System";
>       }
>   }
>
> if($input{'modem'} ne "NONE") {
>      $price += $price-list{$input{'modem'}};

$price_list instead of $price-list

>     $modem = $input{'modem'};
>   }
>
> $price += $price_list{$input{'disk'}};
> $DISK = $input{'disk'};
>
> $price += $price_list{$input{'video'}};
> $VIDEO = $input{'video'};
>
> print &Printheader;
> #print <$in1>;
> print <<"print_tag";
[cut]
> print_tag
>
> print "This is end of file";
>
> I am sorry for such a long text but could not help it. Hope you people
> could understand.
>
> my data.txt file is under cgi-bin directory.
>
> Thanks in advance for the help.
>
> regards,
>
> Arun Mahajan
>
> --
> Posted via CNET Help.com
> http://www.help.com/
>

If you use 'use strict;' in the beginning, most of the errors would be
more obvious.

I didn't look into the logic of your program.

/A

--
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# All junk e-mail is reported to the
# appropriate authorities, no exceptions.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 30 May 2000 07:29:12 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: can somebody help me in this program!!
Message-Id: <3933D038.8CE67847@stomp.stomp.tokyo>

Arun Mahajan wrote:

(snippage)

> this is my first ever program and could not 
> understand the problem why it is not executing. 
> see i am calling my cgi from the html code and want to
> process it and it gives me internal server error. 
> when i check it on command line it gives me 
> following description of errors:-

 
> errors:-
> -----------
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> Use of unintiated value at ./accun-build.cgi at line 6
> Can't use an undefined value as filehandler reference at ./accn_build.cgi 6

> open($PRICE_FILE, "data.tx");
 
> while (<$PRICE_FILE>) {
>     chop;
>     ($item, $price) = split(/:/,$_,2);
>     $price_list{$item} = $price;
>  }
 

Hello Arun,

If you will take a little time, put out a little
effort by comparing your code above to a test
script I wrote for you, down below, you will
quickly notice at least one problem.

Your 500 error, might be this, might be a lot
of things. Try resolving one problem at a time
until your script runs without crashing. You
have command line access. This is a great
advantage in debugging. 

Make a minor change based on what I have here
and discover what happens. Note, only _one_ very
important change as shown. It's $priceless.


Godzilla!



PRINTED RESULTS
_______________


 PRICE_FILE METHOD: 

Price: widget - $3.95 

Price: gidgit - $500.00 

Price: godzilla - $priceless 

Price: perl monger - $worthless 


 $PRICE_FILE METHOD: 


(no print - failed)




TEST SCRIPT
___________


#!/usr/local/bin/perl

print "Content-Type: text/plain\n\n";


open (PRICE_FILE, "price.txt");

print " PRICE_FILE METHOD: \n\n";

while (<PRICE_FILE>) 
 {
  chomp;
  ($item, $price) = split(/:/,$_,2);
  print "Price: $item - \$$price \n\n";
 }

close (PRICE_FILE);



print "\n\n \$PRICE_FILE METHOD: \n\n";

open ($PRICE_FILE, "price.txt");


while (<$PRICE_FILE>) 
 {
  chomp;
  ($item, $price) = split(/:/,$_,2);
  print "Price: $item - \$$price \n\n";
 }

close ($PRICE_FILE);

exit;



CONTENTS OF PRICE TEXT
______________________

widget:3.95
gidgit:500.00
godzilla:priceless
perl monger:worthless


------------------------------

Date: Tue, 30 May 2000 14:15:22 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: can somebody help me in this program!!
Message-Id: <8h0id6$9pl$1@nnrp1.deja.com>

In article <sj7givju5pj117@corp.supernews.com>,
  Arun Mahajan <arun67@yahoo.com> wrote:
> hi everybody,

Hi.

>
> errors:-
> -----------
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58
> undefined value assgined to typeglob at cg-lib.pl line 58

<CLUE>

> Use of unintiated value at ./accun-build.cgi at line 6
> Can't use an undefined value as filehandler reference at
 ./accn_build.cgi 6

</CLUE>

>
> source code of my html:-
> -------------------------------

<SNIP>

>
> source code of my prog:-
> ---------------------------
> #!/usr/bin/perl -w
> push(@INC, "/cgi-bin");
> require("cgi-lib.pl");
>
> &ReadParse(*input);
> open($PRICE_FILE, "data.tx");

$PRICE_FILE is not a proper file handle.  Puting a $ in front makes it a
variable, and that variable has not been initialized.  You may want to
change all occurances of $PRICE_FILE to PRICE_FILE and try again.

perldoc -q filehandle

<SNIP>



Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 30 May 2000 16:15:18 +0200
From: "Wouter" <wouter@quicknet.nl>
Subject: generating WML
Message-Id: <3933cd23$1@einstein.hhs.nl>

Hi,

I am a beginning perl-programmer, so excuse me for making terrible mistakes.

I would like to generate WML just like it is possible to generate html. Is
this already possible and if so. Could anyone give me a clue?

thanx in advance!

Wouter




------------------------------

Date: Tue, 30 May 2000 15:22:19 +0200
From: Ulrich Ackermann <uackermann@orga.com>
Subject: Re: help newbie : how to count line into a txt file
Message-Id: <3933C08B.EAEFB52B@orga.com>

Olivier laurent wrote:
> 
> Hi,
> 
> I usually work with javascript/HTML (I'm a webdesigner) and I don't know
> nothing at all about perl.
> 
> I've got to make a script that count the number of lines of a txt file.
> and publish the result into a static HTML page.
> 
> Is there anybody who can tell me how to start ?
> 
> Any examples will be warmly welcome.
> 
> thx
> 
> Olivier

   # open HANDLE to read
   open TXT, "file.txt" or die "Could not open file: $!";
   # rush through the whole file
   while (<TXT>) {}
   # last linenumber is hold in $.
   print "Zeilen = $.\n";  # or copy into variable: my $lines = $.
   # close HANDLE
   close TXT;


Not most elegant, but it should work (hopefully)

Ulrich














-- 
Ulrich Ackermann
ORGA Kartensysteme GmbH (SY-PEAT-STA)
Tel.:+49.5254.991-925 
mailto:uackermann@orga.com



------------------------------

Date: Tue, 30 May 2000 13:48:03 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: help newbie : how to count line into a txt file
Message-Id: <8h0gqb$8bb$1@nnrp1.deja.com>

In article <39339D92.A9379252@archangelis.com>,
  Olivier laurent <olivier.laurent@archangelis.com> wrote:
> I've got to make a script that count the number of lines of a txt
> file and publish the result into a static HTML page.
>
> Is there anybody who can tell me how to start ?

the special variable "$." contains the current line number for the last
file handle from which you read.

open (FH, 'filename.txt');
my @l = <FH>; # this may not be the best approach for a VERY large file!
print "$. lines in file.\n";

you could also chomp the array "@l", which would return the number of
record separators found.

my $lines = chomp(@l);
print "$lines in file.\n";

for more details:

perldoc perlvar
perldoc perlfunc
pelrdoc perlfaq5

Perl documentation can be found on your perl system, or at:

http://www.cpan.org


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 30 May 2000 13:14:11 GMT
From: monsri@my-deja.com
Subject: HELP: how use '\<CRs>' with "perl -e" in a shell pipe ??
Message-Id: <8h0eqk$6qh$1@nnrp1.deja.com>

Hi here,
I guess my subject is not very clear-cut: I'd like to
know if there's a way of using a command line of
perl in a shell, in a pipe for example, like in the
following:
> echo "something" | perl -e '<perl instructions>'

but with a backslash and a carriage-return to make this
instructions more legible in my shell-script. I want to
be able to do:
> echo "something" | perl -e '<perl instruction1 \
                               perl instr. 2     \
                               etc etc.>'

because my command is pretty long !

Thks for any enlightenment !

Regards,
Seb


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 30 May 2000 09:23:14 -0400
From: Nico Zigouras <zigouras@mail.med.upenn.edu>
Subject: Re: Is Perl for me?
Message-Id: <Pine.OSF.4.21.0005300921530.16728-100000@mail.med.upenn.edu>

Um... you are a Unix administrator and you have to ask if Perl is for
you?  If it isn't is should be.  It will be invaluable for some of your
system automation tasks.  'No' is the answer to all 3 questions below.


On Tue, 30 May 2000, Garbage wrote:

> Date: Tue, 30 May 2000 04:46:56 -0700
> From: Garbage <peterhardingNOpeSPAM@yahoo.com.invalid>
> Newsgroups: comp.lang.perl.misc
> Subject: Is Perl for me?
> 
> This maybe isn't the right forum for this type of question, BUT:
> 
> I am a UNIX administrator who would like to increase my skill
> set. I am NOT a programmer, but would like to learn a new skill
> that will put me in good shape for the future:-
> 
> 1. Is Perl going places?
> 2. Is it old hat technology?
> 3. Is it in great demand by ISP's?
> 
> Thanks for any guidance on this.
> 
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
> 
> 



------------------------------

Date: Tue, 30 May 2000 15:32:57 +0200
From: "Robert Voesten" <robert@pharmapartners.nl>
Subject: Re: Is Perl for me?
Message-Id: <8h0fuf$qru$1@porthos.nl.uu.net>

Hi there,

I just started Perl, because I'm a webdesigner; and there are 2 (general)
ways of getting information from a client, who views your webpages:
A) ASP
B) CGI/PERL

And since I really hate Billy, and getting more and more used to an *nix
enviroment i started with Perl.
I've heard that it comes in handy if you know C(++)/Perl if you work in a
*nix enviroment because you can build and customize it the way you want. So
since, you're an admin, I guess it IS valueble to learn Perl. The best book
is said to be is "Programming Perl 2nd Edition" by Larry Wall (creator of
PERL) published by O'reilly.

Good luck,

Robert Voesten

"Garbage" <peterhardingNOpeSPAM@yahoo.com.invalid> schreef in bericht
news:041afcc0.08aae64c@usw-ex0102-013.remarq.com...
> This maybe isn't the right forum for this type of question, BUT:
>
> I am a UNIX administrator who would like to increase my skill
> set. I am NOT a programmer, but would like to learn a new skill
> that will put me in good shape for the future:-
>
> 1. Is Perl going places?
> 2. Is it old hat technology?
> 3. Is it in great demand by ISP's?
>
> Thanks for any guidance on this.
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>




------------------------------

Date: Tue, 30 May 2000 10:10:39 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Is Perl for me?
Message-Id: <3933CBDF.B27C110B@attglobal.net>

Robert Voesten wrote:
> 
> Hi there,
> 
> I just started Perl, because I'm a webdesigner; and there are 2 (general)
> ways of getting information from a client, who views your webpages:
> A) ASP
> B) CGI/PERL

Please remember that 'CGI' ne 'Perl'.  CGI can be done in so many
different languages.  Ive seen CGI done in C, C++, Perl, COBOL, shell,
and on and on.  CGI is an interface specification, and is therefore 
language independant.  But then again, ASP is platform independant too,
although most people still see it as a M$ only thing.


------------------------------

Date: Tue, 30 May 2000 13:39:17 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <sj7h45dr5pj131@corp.supernews.com>

Following is a summary of articles from new posters spanning a 8 day
period, beginning at 22 May 2000 14:44:22 GMT and ending at
30 May 2000 13:52:45 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  274 (46.5% of all posters)
Articles: 444 (21.0% of all articles)
Volume generated: 743.2 kb (20.2% of total volume)
    - headers:    351.9 kb (7,117 lines)
    - bodies:     383.5 kb (13,240 lines)
    - original:   290.4 kb (10,493 lines)
    - signatures: 7.3 kb (189 lines)

Original Content Rating: 0.757

Averages
========

Posts per poster: 1.6
    median: 1.0 post
    mode:   1 post - 177 posters
    s:      1.4 posts
Message size: 1713.9 bytes
    - header:     811.5 bytes (16.0 lines)
    - body:       884.6 bytes (29.8 lines)
    - original:   669.8 bytes (23.6 lines)
    - signature:  16.8 bytes (0.4 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   10    24.4 ( 10.8/ 13.6/  8.8)  kiera@nnickee.com
    8    13.2 (  5.6/  7.6/  5.6)  Chris <csorensen@uptimeresources.net>
    6     6.5 (  3.7/  2.8/  2.8)  Guest <guest@yale.edu>
    6    13.3 (  5.4/  7.8/  4.0)  "John A. Dutton" <jad9@po.cwru.edu>
    6     6.9 (  4.8/  2.0/  1.0)  "M Lalonde" <passagewd@primus.ca>
    6     5.0 (  3.9/  1.1/  1.1)  "Adolf" <adolftw@tcts1.seed.net.tw>
    5     7.4 (  4.0/  3.4/  2.5)  sergei_kucherov <sergei_kucherov@3com.com>
    4     5.6 (  3.0/  2.6/  1.3)  "´ô´ô¹Ï" <huxh@990.net>
    4     5.1 (  3.1/  2.0/  2.0)  Chung Derek <dchk_78NOdcSPAM@yahoo.com.invalid>
    4     6.8 (  3.4/  3.4/  1.9)  "Aaron" <vandemen@yahoo.com>

These posters accounted for 2.8% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  28.8 (  1.7/ 27.0/ 26.9)      2  ra <R.Arlitt@itm.rwth-aachen.de>
  24.4 ( 10.8/ 13.6/  8.8)     10  kiera@nnickee.com
  16.3 (  2.8/ 13.5/  9.0)      3  Raphael Arlitt <raphael.arlitt@mmw.fh-aachen.de>
  15.1 (  3.9/ 11.1/  5.7)      3  chuck <cgoehring@rcisd.com>
  13.3 (  5.4/  7.8/  4.0)      6  "John A. Dutton" <jad9@po.cwru.edu>
  13.2 (  5.6/  7.6/  5.6)      8  Chris <csorensen@uptimeresources.net>
   8.2 (  2.2/  5.7/  4.6)      3  r.polanskis@nepean.uws.edu.au
   7.4 (  4.0/  3.4/  2.5)      5  sergei_kucherov <sergei_kucherov@3com.com>
   6.9 (  2.6/  4.3/  2.7)      3  sergei kucherov <sergei_kucherovNOseSPAM@3com.com.invalid>
   6.9 (  4.8/  2.0/  1.0)      6  "M Lalonde" <passagewd@primus.ca>

These posters accounted for 3.8% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  1.4 /  1.4)      3  j555@my-deja.com
1.000  (  2.8 /  2.8)      6  Guest <guest@yale.edu>
1.000  (  1.1 /  1.1)      6  "Adolf" <adolftw@tcts1.seed.net.tw>
1.000  (  0.9 /  0.9)      3  gasior@snet.net
1.000  (  0.8 /  0.8)      3  "Alexey Alexapolsky" <wake@thukraine.com>
1.000  (  2.0 /  2.0)      4  Chung Derek <dchk_78NOdcSPAM@yahoo.com.invalid>
0.976  (  3.8 /  3.9)      4  Cav <caviatte@aol.comNoSpam>
0.917  (  1.9 /  2.1)      3  "peter" <peter_icaza@uhc.com>
0.901  (  2.2 /  2.4)      3  "Joshua J. Kugler" <isd@mail.as.uaf.edu>
0.857  (  1.3 /  1.5)      3  "Seansan" <sean77@dds.nl>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.506  (  4.0 /  7.8)      6  "John A. Dutton" <jad9@po.cwru.edu>
0.505  (  0.7 /  1.4)      3  Ilmari Karonen <usenet11103@itz.pp.sci.fi>
0.486  (  1.0 /  2.0)      6  "M Lalonde" <passagewd@primus.ca>
0.475  (  0.7 /  1.5)      3  "Orabîg" <bchauvet@capgemini.fr>
0.463  (  0.4 /  0.9)      3  Stephan Canisius <SCanisius@dusnet.de>
0.462  (  1.1 /  2.3)      3  me@tinita.de
0.439  (  0.9 /  2.1)      4  mnatoni@rumbanet.it
0.369  (  0.5 /  1.5)      3  James Tolley <james@208.23.123.242>
0.324  (  1.0 /  3.2)      4  Jim Kipp <jkipp5@home.com>
0.179  (  0.3 /  1.5)      3  Kevin Miles <kdmiles@lucent.com>

38 posters (13%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      34  comp.lang.perl.moderated
      23  comp.lang.perl
      23  comp.lang.perl.modules
      15  comp.unix.shell
      14  comp.unix.programmer
      14  comp.sys.sun.admin
      14  comp.unix.admin
      10  alt.perl
       8  comp.sys.hp.hpux
       7  comp.infosystems.www.servers.unix

Top 10 Crossposters
===================

Articles  Address
--------  -------

       8  Dave Vandervies <dj3vande@student.math.uwaterloo.ca>
       6  "debra karr" <dkarr1@san.rr.com>
       4  Ben Smithurst <ben@scientia.demon.co.uk>
       3  Raphael Arlitt <raphael.arlitt@mmw.fh-aachen.de>
       2  Clinton Mahoney <cmahoney@indiana.edu>
       2  "Alex Borshik" <alexborshik@hotmail.com>
       2  Mr. Stan M. Gerbig <sgerbig@trinity.ucs.indiana.edu>
       2  calderas@my-deja.com
       2  "e8825393" <e8825393@stud2.tuwien.ac.at>
       2  ra <R.Arlitt@itm.rwth-aachen.de>


------------------------------

Date: Tue, 30 May 2000 06:36:07 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: oops Re: seeking method to encode email addresses in web page forms
Message-Id: <3933C3C7.E23BF269@stomp.stomp.tokyo>

The WebDragon wrote:
>  "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>  | The WebDragon wrote:
>  | > Godzilla! <godzilla@stomp.stomp.tokyo> wrote:

>  | >  | $email = "callgirl\@la.znet.com";

>  | > DOH, forgot one thing too.. you can leave off 
>  | > escaping the @ if you use

>  | >     $email = 'callgirl@la.znet.com';

>  | However, I am not using apostrophes for quotes.
>  | This @ character needs to be escaped or a syntax
>  | error is encountered.

>  | Would you mind citing a rule indicating I must
>  | use apostophes for quote marks? Seems a matter
>  | of personal preference, when syntax variations
>  | are used correctly.
 
> no, actually there is a difference..


Really Sherlock? Who would have guessed.

 
> with "" pairs, what is between them gets interpolated, 
> (meaning you have to escape the @)
 
> with '' pairs, there is no interpolation, meaning it 
> is not necessary to use \@
 
> see the difference? :)
 
> I know you didn't originally use the ' marks, however 
> I thought you might like to know about it, as for long 
> strings, there is no need to escape chars within, no 
> variable or metachar interpolation occurs, and you don't 
> have to escape other \" marks that may appear inside the ''
> pairs :)

Not only do I see the difference, I well know
the difference. However it is my personal choice
not to write this type of crap code coming out of
this group. I am a programmer, not a sissified
geek one line weenie who doesn't have a clue on
writing great programs.

At least you are not pulling one of these anal
retentive code cop trips so typical for these
unskilled know-it-alls around here.

"sometimes this \@ works better"

'sometimes this @ works better'

Trick Mr. Dragon, is in knowing which is
best for any given set of circumstances.
This sorts out great programmers from
one liner weenies.

Do you see the difference? One little
finger keystroke. This is not such a
major effort, yes? Not such a major
effort when you are typing programs
at a rate of over one hundred characters
per minute like I do.

It's all a matter of personal preference
in deciding how you want to write your
program. Experts around here don't have
enough with-it-all to realize Perl affords
us more than one way to do it, not just their
own anal retentive you-must-do-this-way.

Say, what ever happened to our friend,
the Hooter's Girl, Pennie?

Godzilla!


------------------------------

Date: 30 May 2000 14:26:47 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: oops Re: seeking method to encode email addresses in web page forms
Message-Id: <8h0j37$kvb$2@216.155.32.164>

In article <3933C3C7.E23BF269@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

 | "sometimes this \@ works better"
 | 
 | 'sometimes this @ works better'
 | 
 | Trick Mr. Dragon, is in knowing which is
 | best for any given set of circumstances.
 | This sorts out great programmers from
 | one liner weenies.
 | 
 | Do you see the difference? One little
 | finger keystroke. This is not such a
 | major effort, yes? Not such a major
 | effort when you are typing programs
 | at a rate of over one hundred characters
 | per minute like I do.

however, it is NOT one little keystroke when you have to escape every 
single " in a line like:

$pretend_input = "Name:  <a href=\"http://www.planetunreal.com/dl/  
nc.asp? nalicity/utdm/dm-cyberwar.zip\">DM-Cyberwar</a><br>\n\n Author:  
<a href=\"mailto:666deadman666\@email.msn.com\">deadman </a><br>\n\n  
Rating: (1-10) 7.5 <p></p>\n <p>Name:  <a 
href=\"http://www.planetunreal.com/dl/  nc.asp?nalicity/\n 
utdm/dm-nitro.zip\">DM-Nitro</a><br>\n Author: <a 
href=\"mailto:ebolt\@planetunreal.com\">Eric \'Ebolt\' Boltjes</a> 
<br>\n Rating: (1-10) 9</p><!-- add correct image name below here -->\n";

which could be even more easily written as a here-document: 

$pretend_input = <<EOF;
Name:  <a 
href="http://www.planetunreal.com/dl/nc.asp?nalicity/utdm/dm-cyberwar.zip
">DM-Cyberwar</a><br>

Author:  <a href="mailto:666deadman666@email.msn.com">deadman </a><br>

Rating: (1-10) 7.5 <p></p>

<p>
Name:  <a href="http://www.planetunreal.com/dl/nc.asp?nalicity/
utdm/dm-nitro.zip">DM-Nitro</a><br>
Author: <a href="mailto:ebolt@planetunreal.com">Eric 'Ebolt' Boltjes</a> 
<br>
Rating: (1-10) 9</p><!-- add correct image name below here -->

EOF

but to simplify the example let's take 

$authorline = 'Author:  <a 
href="mailto:666deadman666@email.msn.com">deadman </a>';

instead of 

$authorline = "Author:  <a 
href=\"mailto:666deadman666\@email.msn.com\">deadman </a>";

it all depends on the nature of the quoted material and what needs to be 
done to/with it.

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 3205
**************************************


home help back first fref pref prev next nref lref last post