[17923] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 83 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 17 18:11:37 2001

Date: Wed, 17 Jan 2001 15:10:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <979773016-v10-i83@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 17 Jan 2001     Volume: 10 Number: 83

Today's topics:
        perl novice needs help with a couple of errors <kenneth.hopkins@pegs.com>
    Re: perl novice needs help with a couple of errors (Richard Zilavec)
    Re: perl novice needs help with a couple of errors <ren.maddox@tivoli.com>
        Perl/IIS and open() <jew208@psu.edu>
    Re: Perl/IIS and open() <ronnie@catlover.com>
    Re: Perl/IIS and open() <jew208@psu.edu>
        Problem modifying binary file twolfmaier@acm.org
        regular expression question. pls help vupt@yahoo.com
        Run perl from a Perl script ? How ? <DarrenDeans@Hotmail.com>
        Running htpasswd with Perl xlr6drone@my-deja.com
        Saving .htm file to disk from CGI script <nomail@spam.com>
        String eq problem alazarev1981@my-deja.com
    Re: String eq problem <aqumsieh@hyperchip.com>
    Re: String eq problem <ren.maddox@tivoli.com>
    Re: String eq problem (Damian James)
    Re: String eq problem <mjcarman@home.com>
    Re: String eq problem <ronnie@catlover.com>
        Syntax -  Still need HELP <paul_wasilkoff@ucg.org>
        Syntax - HELP <paul_wasilkoff@ucg.org>
    Re: Syntax - HELP <ren.maddox@tivoli.com>
    Re: techniques for finding slow code? <mjcarman@home.com>
    Re: TNEF For Perl. Need Help. Is this a Perl Script? <kingmick@news4.rdc1.on.wave.home.com>
    Re: What do you call the => operator? <flavell@mail.cern.ch>
    Re: What do you call the => operator? <lwebbee@britcomtele.comnotreal>
    Re: What do you call the => operator? <lwebbee@britcomtele.comnotreal>
    Re: Win32 User grehom@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 17 Jan 2001 14:08:47 -0800
From: Ken Hopkins <kenneth.hopkins@pegs.com>
Subject: perl novice needs help with a couple of errors
Message-Id: <3A6617EF.4EC66310@pegs.com>


--------------0AA33FA3628E629B75376461
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi all - I am attempting to read in a file that just has ONLY a 6 digit
integer on each line (about 500 lines) and am doing some sql (informix
database) queries on the data and spitting out the data to a new line.
BUT I am receiving 2 errors that make no sense to my novice perl
experience - can anyone tell me what is wrong with my small program and
any programming pointer would be appreciated as well.

Thanks a bunch!
- Kenny

errors are:
Use of uninitialized value in scalar chomp at jose.pl line 10, <> line
1.
Use of uninitialized value in concatenation (.) at jose.pl line 15, <>
line 1.
Died at jose.pl line 25, <> line 1.

#!/usr/bin/perl -w
use strict;
use POSIX;

my $num;   # client_num retrieved from text file
my $line;

while(<>)
{
  chomp($line);
  $num = $line;

  open(ISQL,"|isql utell >/dev/null 2>&1") or die;

  print(ISQL "
    UNLOAD TO isql.out
    SELECT client_type, client_id, client_num,
           last_name, address1, address2, address3,
           city, state, zip, country, home_phone,
           business_phone, fax_phone, email
    FROM client_ids
    WHERE client_num = '$num' ");

  close(ISQL);
  open(ISQL,"isql.out") or die;
  while(<ISQL>) {print}
  close(ISQL);


--------------0AA33FA3628E629B75376461
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<font face="Courier New,Courier"><font size=-1>Hi all - I am attempting
to read in a file that just has ONLY a 6 digit integer on each line (about
500 lines) and am doing some sql (informix database) queries on the data
and spitting out the data to a new line. BUT I am receiving 2 errors that
make no sense to my novice perl experience - can anyone tell me what is
wrong with my small program and any programming pointer would be appreciated
as well.</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>Thanks a bunch!</font></font>
<br><font face="Courier New,Courier"><font size=-1>- Kenny</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>errors are:</font></font>
<br><font face="Courier New,Courier"><font size=-1>Use of uninitialized
value in scalar chomp at jose.pl line 10, &lt;> line 1.</font></font>
<br><font face="Courier New,Courier"><font size=-1>Use of uninitialized
value in concatenation (.) at jose.pl line 15, &lt;> line 1.</font></font>
<br><font face="Courier New,Courier"><font size=-1>Died at jose.pl line
25, &lt;> line 1.</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>#!/usr/bin/perl -w</font></font>
<br><font face="Courier New,Courier"><font size=-1>use strict;</font></font>
<br><font face="Courier New,Courier"><font size=-1>use POSIX;</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>my $num;&nbsp;&nbsp;
# client_num retrieved from text file</font></font>
<br><font face="Courier New,Courier"><font size=-1>my $line;</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>while(&lt;>)</font></font>
<br><font face="Courier New,Courier"><font size=-1>{</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; chomp($line);</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; $num = $line;</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; open(ISQL,"|isql
utell >/dev/null 2>&amp;1") or die;</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>&nbsp; print(ISQL "</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp; UNLOAD
TO isql.out</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp; SELECT
client_type, client_id, client_num,</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
last_name, address1, address2, address3,</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
city, state, zip, country, home_phone,</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
business_phone, fax_phone, email</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp; FROM
client_ids</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp;&nbsp;&nbsp; WHERE
client_num = '$num' ");</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>&nbsp; close(ISQL);</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; open(ISQL,"isql.out")
or die;</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; while(&lt;ISQL>)
{print}</font></font>
<br><font face="Courier New,Courier"><font size=-1>&nbsp; close(ISQL);</font></font>
<br><font face="Courier New,Courier"><font size=-1></font></font>&nbsp;</html>

--------------0AA33FA3628E629B75376461--



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

Date: Thu, 18 Jan 2001 00:21:33 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: perl novice needs help with a couple of errors
Message-Id: <3a67362c.239840712@news.tcn.net>

On Wed, 17 Jan 2001 14:08:47 -0800, Ken Hopkins
<kenneth.hopkins@pegs.com> wrote:

>errors are:
>Use of uninitialized value in scalar chomp at jose.pl line 10, <> line
>1.
>Use of uninitialized value in concatenation (.) at jose.pl line 15, <>
>line 1.
>Died at jose.pl line 25, <> line 1.
>
>#!/usr/bin/perl -w
>use strict;
>use POSIX;
>
>my $num;   # client_num retrieved from text file
>my $line;
>
>while(<>)
>{
>  chomp($line);

$line doesn't seem to contain anything....
while($line = <>) {
	chomp $line;
	$num = $line;
or

while(<>) {
	chomp;
	$num = $_;


--
 Richard Zilavec
 rzilavec@tcn.net


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

Date: 17 Jan 2001 15:25:23 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: perl novice needs help with a couple of errors
Message-Id: <m3itndyipo.fsf@dhcp11-177.support.tivoli.com>

Ken Hopkins <kenneth.hopkins@pegs.com> writes:

> while(<>)
> {
>   chomp($line);
>   $num = $line;

You've never given $line a value.  Change to either:

  while($line = <>)

OR

  chomp;
  $num = $_;

Though assigning the line to $num without modifying it or testing it
is a strange thing to do.  If you expect the input to be a number, you
should probably explicitly control that.  

-- 
Ren Maddox
ren@tivoli.com


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

Date: Wed, 17 Jan 2001 20:48:18 GMT
From: "John Woltman" <jew208@psu.edu>
Subject: Perl/IIS and open()
Message-Id: <myn96.150$1m.5822@bgtnsc04-news.ops.worldnet.att.net>

Hello all.
    I'm trying to write a CGI script that will take a text file and insert
it into an HTML file.  I am using:

-- snip --
    $filename = "logs/20010117.txt";
    open(hFile, $filename);

    for $line ( <hFile>)
    {
        print $line;
    }
-- snip --
But it doesn't work, even though the URL for the included file is correct.
It doesn't work on my test server or on my production server, both of which
are running W2K and IIS. Is it a permissions thing?  When I run the code as
a command-line script (without CGI stuff) it works just fine.
If anyone can help me I'd appreciate it.
  - John Woltman




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

Date: Wed, 17 Jan 2001 16:42:56 -0500
From: Ron Grabowski <ronnie@catlover.com>
Subject: Re: Perl/IIS and open()
Message-Id: <3A6611E0.F13291F8@catlover.com>

>     open(hFile, $filename);

You are not checking for errors. Perhaps you are in the wrong directory.
Also try chdir('c:/winnt/system32/logfiles/'); or something similiar.

open( HFILE, $filename) or die("error opening $filename: $!");

> 
>     for $line ( <hFile>)
>     {
>         print $line;
>     }

print <HFILE>;

- Ron


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

Date: Wed, 17 Jan 2001 22:14:49 GMT
From: "John Woltman" <jew208@psu.edu>
Subject: Re: Perl/IIS and open()
Message-Id: <tPo96.125$cN.6302@bgtnsc07-news.ops.worldnet.att.net>

I tried giving the CGI script the full path name (d:/www/log/log.txt) and it
worked.  But I don't know the full path on the production server.  I *know*
the path is correct because if I use the same script to generate a link to
the log file then the link works.
like this:
    $filename = "/logs/log.txt";
    print "<a href=\"$filename\">link</a>";   # takes me to correct file
    open (HFILE, $filename);   #bombs.
This is the error code I get when I include an "or die" for the open()
statement.
    error opening /logs/log.txt: No such file or directory
The file *does* exist, but I don't know what else the problem could be.
Could it be something else?
Thanks for your help so far.
  - John Woltman

"Ron Grabowski" <ronnie@catlover.com> wrote in message
news:3A6611E0.F13291F8@catlover.com...
> >     open(hFile, $filename);
>
> You are not checking for errors. Perhaps you are in the wrong directory.
> Also try chdir('c:/winnt/system32/logfiles/'); or something similiar.
>
> open( HFILE, $filename) or die("error opening $filename: $!");
>
> >
> >     for $line ( <hFile>)
> >     {
> >         print $line;
> >     }
>
> print <HFILE>;
>
> - Ron




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

Date: Wed, 17 Jan 2001 19:20:45 GMT
From: twolfmaier@acm.org
Subject: Problem modifying binary file
Message-Id: <944ra2$d14$1@nnrp1.deja.com>

I have a script that reads a value from a binary file, increments the
value and writes it back to the same file. Here is a small test script
that implements this functionality:


#!perl -w

use strict;

use constant SEQ_REC_FMT  => 'n';
use constant SEQ_REC_SIZE => length(pack(SEQ_REC_FMT, ()));

my $id = 0;

open(SEQ_FH, ">seq_test.seq") or die("Cannot open file: $!");
binmode(SEQ_FH);
print(SEQ_FH pack(SEQ_REC_FMT, $id)) or die("Cannot write to file: $!");
close(SEQ_FH) or die("Cannot close file: $!");

while ($id < 10000) {
    print "$id\n";

    open(SEQ_FH, "+<seq_test.seq") or die("Cannot open file: $!");
    binmode(SEQ_FH);
    my $fh = *SEQ_FH;

    # Read value
    seek($fh, 0, 0) or die("Cannot set file position: $!");
    defined(read($fh, $id, SEQ_REC_SIZE)) or die("Cannot read from file:
$!");
    $id = unpack(SEQ_REC_FMT, $id);
    die("Uninitialized value\n") unless (defined($id));
    $id++;

    # Write value
    seek($fh, 0, 0) or die("Cannot set file position: $!");
    truncate($fh, 0) or die ("Cannot truncate file: $!");
    print($fh pack(SEQ_REC_FMT, $id)) or die("Cannot write to file:
$!");

    close($fh) or die("Cannot close file: $!")
}

__END__


If I use network format, when the value hits 26, the value read from the
file is suddenly undefined. I haven't figured out how to check what
exactly is in the file at this point, but it is only 1 instead of 2
bytes. If I start with 27, the problem occurs when the value hits 282.

If I use VAX format (v), the problems occurs for the first time when the
value hits 6656.

I have gone over this code numerous times and I can't figure out what is
wrong or how I could check what goes wrong.

Any help is appreciated.

Thomas

-----------------------------------------------------
Thomas Wolfmaier
Human-Computer Interaction Resource Network (HCIRN)
25 Bucks Green Road, Thornhill, ON, Canada, L3T 4G1
Tel: +1-905-881-7095
Email: twolfmaier@acm.org
Web: www.hcirn.com
-----------------------------------------------------


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 17 Jan 2001 21:58:22 GMT
From: vupt@yahoo.com
Subject: regular expression question. pls help
Message-Id: <9454hp$mdd$1@nnrp1.deja.com>

Hi,

I'm having a perl regular expression problem and am hoping someone can
give me a hand.

Supposing I have the following data  :

<item delimiter=", " name="UPT
PIR"><value>http://www.uptpir.com/products/index.html</value></item>

There are many items but the item that I want has name attribute with
value "UPT PIR"
I would like to extract the content between <value></value> and so for
the above example,
http://www.uptpir.com/products/index.html would be the value extracted.

the regular expression I am using right now is

my $matchKey="UPT PIR[ .]*?<value>(.*)</value>";
	if ($line=~/$matchKey/) {
	     print "match $1\n";
   } else {
	     print "no match\n";
   }



If anyone can give me a hand, it would be so appreciated.



Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 17 Jan 2001 22:59:48 -0000
From: <DarrenDeans@Hotmail.com>
Subject: Run perl from a Perl script ? How ?
Message-Id: <Pup96.5404$3N1.122307@news2-win.server.ntlworld.com>

Can anybody tell me how to run a perl script from a perl script ?

Darren




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

Date: Wed, 17 Jan 2001 22:34:03 GMT
From: xlr6drone@my-deja.com
Subject: Running htpasswd with Perl
Message-Id: <9456kr$ob9$1@nnrp1.deja.com>

Hello all,

I am wondering if it is possiblle to run htpasswd (and setup up a
username and password for .htaccess) by running a process to
the shell.

For example you can get the date by this method:

$now = "the time is now ".`date`;

I have tried running this for htpasswd

$pwd = `htpasswd -c /usr/bin/users username`;

but of course when this is done at the command line the user is
given a prompt to enter their password and then another prompt to
confirm it.  Does anyone know how the password could be
inputted from a Perl script.

Could this be done by using processes as filehandles?

I am asking because my web hosting company does not allow
telnet access - so I have no access to a command line.

Any suggestions - thanks in advance


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 17 Jan 2001 22:04:26 GMT
From: "Trees for Life" <nomail@spam.com>
Subject: Saving .htm file to disk from CGI script
Message-Id: <KFo96.19242$_B2.1564577@typhoon.kc.rr.com>

I'm using Perl for CGI scripting. I want the script to generate an HTML
file, but instead of printing it to STDOUT, to create a .htm file on my hard
drive. Can this be done? Following is my test code. Instead of creating an
 .htm file, it printed the Hello World to screen.

Curtis

-------------------------- Cut here --------------------------

open (HTMLFILE, "> cgi-bin/savehtmtolocal.htm") or die "Could not open
file.";
flock (HTMLFILE, 2) or die "Could not lock file.";

print HTMLFILE <<LIST_ITEM;
<HTML>\n
<HEAD>\n
<TITLE>Hello World<TITLE>\n
</HEAD>\n
<BODY>\n
<H1>Hello World!</H1>\n
</BODY>\n
</HTML>
LIST_ITEM

flock (HTMLFILE, 8);
close HTMLFILE;






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

Date: Wed, 17 Jan 2001 19:11:48 GMT
From: alazarev1981@my-deja.com
Subject: String eq problem
Message-Id: <944qpc$cfa$1@nnrp1.deja.com>

I'm trying to read a file and add to it at a specific point. I know I'm
reading the files correctly because I've added things to the file
before. However, I have the following lines in my perl program and it
is not matching the string properly:

foreach(@xmlFileArray) {
  if($_ eq '  <Member number="*" status="*">\n') {
    print "matched the string!";
  }
}

I'm trying to search for the following string, which is in my file:

"  <Member number="1999-003" status="completed">\n"

Keep in mind I need to search for any number and any status, hence the
* in my if condition. And the line has a newline at the end of it.

Any solutions?

Thanks in advance,
Alex Lazarevich
alazarev@itg.uiuc.edu


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 17 Jan 2001 20:36:28 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: String eq problem
Message-Id: <7ag0ihrk4y.fsf@merlin.hyperchip.com>


alazarev1981@my-deja.com writes:

> I'm trying to read a file and add to it at a specific point. I know I'm
> reading the files correctly because I've added things to the file
> before. However, I have the following lines in my perl program and it
> is not matching the string properly:
> 
> foreach(@xmlFileArray) {
>   if($_ eq '  <Member number="*" status="*">\n') {
                                              ^^
                                              ^^
                                              ^^
Inside single quoted strings, \n is simply the two characters \ followed
by n. It doesn't mean a newline, as you might expect. I suspect you used
single quotes because of the presence of double quotes in your
string. It is important to know that in Perl, unlike other languages,
single and double quotes are different. Change the above to:

	if ($_ eq qq/  <Member number="*" status="*">\n/) {

You might want to read in perlop for more information on qq//. I also
advise you to have a look at perlre for more information on regular
expressions, as I believe they might be useful for you.

--Ala


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

Date: 17 Jan 2001 14:09:32 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: String eq problem
Message-Id: <m3zogqym83.fsf@dhcp11-177.support.tivoli.com>

alazarev1981@my-deja.com writes:

>   if($_ eq '  <Member number="*" status="*">\n') {

You'll want to use a Regex for this.  Take a look at perlre(1) for
more information, but something like:

    if(/<Member number=".*" status=".*">/) {

though this may be too permissive for your needs.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 17 Jan 2001 21:21:55 GMT
From: damian@puma.qimr.edu.au (Damian James)
Subject: Re: String eq problem
Message-Id: <slrn96c393.t92.damian@puma.qimr.edu.au>

In article <7ag0ihrk4y.fsf@merlin.hyperchip.com>, Ala Qumsieh wrote:
>
>alazarev1981@my-deja.com writes:
>
>> I'm trying to read a file and add to it at a specific point. I know I'm
>> reading the files correctly because I've added things to the file
>> before. However, I have the following lines in my perl program and it
>> is not matching the string properly:
>> 
>> foreach(@xmlFileArray) {
>>   if($_ eq '  <Member number="*" status="*">\n') {
>                                              ^^
>...single and double quotes are different. Change the above to:
>
>	if ($_ eq qq/  <Member number="*" status="*">\n/) {
>

But this still doesn't do what the OP asked, and will only match those
cases where both the number and the status are "*". The OP needs to look at
perldoc perlop and examine m//, the pattern match operator.

Cheers,
Damian


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

Date: Wed, 17 Jan 2001 14:29:23 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: String eq problem
Message-Id: <3A6600A3.95F905BE@home.com>

alazarev1981@my-deja.com wrote:
> 
> I'm trying to read a file and add to it at a specific point.
> [...] I have the following lines in my perl program and it
> is not matching the string properly:
> 
> foreach(@xmlFileArray) {
>   if($_ eq '  <Member number="*" status="*">\n') {
>     print "matched the string!";
>   }
> }
> 
> I'm trying to search for the following string, which is in my file:
> 
> "  <Member number="1999-003" status="completed">\n"

Careful, you can't embed double quotes that way. In Perl, you'ld write
that as (e.g.):

qq!  <Member number="1999-003" status="completed">\n!;

On to the main problem: eq is used to test for string equality. You want
to do a pattern match. A simple one would be

if ($_ =~ /  <Member number=".+" status=".+">$/)

The period means "any char (except newline)."
The + means "1 or more of the preceding."
The $ means "end of line."

You may want to make it more specific, though. e.g.

if ($_ =~ /  <Member number="\d{4}-\d+" status="\w+">$/)

Just what pattern you use will depend on how strict you want to make the
match. That's up to you.

For more info, read up on regular expressions, starting with the perlre
manpage.

-mjc


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

Date: Wed, 17 Jan 2001 16:52:36 -0500
From: Ron Grabowski <ronnie@catlover.com>
Subject: Re: String eq problem
Message-Id: <3A661424.22EB41CA@catlover.com>

>     if(/<Member number=".*" status=".*">/) {

/<Member number=".*?" status=".*?">/

Without the first question mark, $1 will contain everything till the
last quotation mark.

- Ron


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

Date: Wed, 17 Jan 2001 17:39:36 -0500
From: "PaAnWa" <paul_wasilkoff@ucg.org>
Subject: Syntax -  Still need HELP
Message-Id: <t6c7t2ikrdope3@corp.supernews.com>

Hi Ren,

Thanks for the post.

I would love to have that problem but I can't see it....

for example, line 118 had the "next token 'print '" error; here is the
previous and next line of code:
  print "<HR><H3>You did not fill in the required Survey Information
fields."; #Line 117
  print " Please click the Back button at the top of your browser and answer
"; #Line 118
  print "the two survey questions listed at the bottom of the page.</P>";
#Line 119

Line 174 "next char ;"
 print DBFILE "\"$in{'LF'}\",";       #Line 173
 print DBFILE "\"$in{'MF'}\",";       #Line 174
 print DBFILE "\"$in{'RL'}\",";       #Line 175

It just does not make sense.....

PAW




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

Date: Wed, 17 Jan 2001 15:37:25 -0500
From: "PaAnWa" <paul_wasilkoff@ucg.org>
Subject: Syntax - HELP
Message-Id: <t6c0o2mvv5nu9b@corp.supernews.com>

I am trying to de-bug a script but keep getting 2 errors when I run the
'perl -wc' command.  The errors are:
   at line 118, next token "print "
   at line 174, next char ;

Line 118 of the code is:
  print " Please click the Back button at the top of your browser and answer
";

Line 174 of the code is:
 print DBFILE "\"$in{'MF'}\",";       #L20

Any ideas what it means?

PAW





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

Date: 17 Jan 2001 15:14:53 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Syntax - HELP
Message-Id: <m38zo9zxrm.fsf@dhcp11-177.support.tivoli.com>

"PaAnWa" <paul_wasilkoff@ucg.org> writes:

> I am trying to de-bug a script but keep getting 2 errors when I run the
> 'perl -wc' command.  The errors are:
>    at line 118, next token "print "
>    at line 174, next char ;
> 
> Line 118 of the code is:
>   print " Please click the Back button at the top of your browser and answer
> ";

The problem almost certainly is on the previous line -- a missing
semicolon perhaps?

> Line 174 of the code is:
>  print DBFILE "\"$in{'MF'}\",";       #L20

Not sure what the problem here is, but you should probably look into
qq// and rewrite this as:

  print DBFILE qq/"$in{MF}",/;

(I also omitted the single quotes around the hash key, which are
unnecessary.)

In any event, it looks like the syntax of this line is fine as well,
so the problem is also probably from a preceding line.

-- 
Ren Maddox
ren@tivoli.com


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

Date: Wed, 17 Jan 2001 13:59:58 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: techniques for finding slow code?
Message-Id: <3A65F9BE.908A9396@home.com>

dtbaker_dejanews@my-deja.com wrote:
>
> tadmc@augustmail.com wrote:
>>
>> dtbaker_dejanews@my-deja.com wrote:
>>>
>>> I'd like to hear if ya'll have some favorite techniques for 
>>> zeroing in on slow code.
>>
>> You mean beyond the ones offered in the answer to your Frequently
>> Asked Question? No.
> 
> yes, beyond the use of benchmark as described in FAQ3...
> 

You didn't read closely enough. :) If you had you would have seen part
about the Devel::DProf module. Benchmark is meant to test alternative
ways of doing the same thing, not for profiling entire programs. Use
Devel::DProf for that.

-mjc


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

Date: Wed, 17 Jan 2001 22:00:43 GMT
From: Kingmick <kingmick@news4.rdc1.on.wave.home.com>
Subject: Re: TNEF For Perl. Need Help. Is this a Perl Script?
Message-Id: <94549v$pot$1@news4.rdc1.on.wave.home.com>

metacomputer1239@my-deja.com wrote:

Try:  http://world.std.com/~damned/
> Hello,
>     I am try to setup a program called AMAVIS email virus scanner.
> The Linux box is using RED HAT 6.0, when I try to install the AMAVIS it
> gives me a message that I need TNEF. I can't find TNEF for REDHAT 6.0
> RPM. Does anyone no where it can be found?
>      Is TNEF a Perl module, or program? Can a newer version of TNEF be
> re-compiled, for Red HAt 6.0.

> Thank You
> Bob Brown


> Sent via Deja.com
> http://www.deja.com/


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

Date: Wed, 17 Jan 2001 19:53:41 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: What do you call the => operator?
Message-Id: <Pine.LNX.4.30.0101171951270.23243-100000@lxplus003.cern.ch>

On Tue, 16 Jan 2001, Matt Schalit wrote:

(to Tad, for heaven's sake)

> I don't know who you are or what you represent.
> This is the first post I've read from you,
[...and so on...]

Your application for membership of the killfile has been given due
consideration, and overwhelmingly approved.

bye



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

Date: Wed, 17 Jan 2001 19:54:56 +0000
From: Lee Webb <lwebbee@britcomtele.comnotreal>
Subject: Re: What do you call the => operator?
Message-Id: <944tal$3ql$1@plutonium.btinternet.com>

Matt,

I'm the original poster of the message that Tad "didn't like". I didn't 
like his reply so I EMAILED him about it and explained why I posted what I 
did.

Granted, I hated the message that he sent, but that still doesn't give me a 
right to slag him off, *especially* publically on the newsgroup.

(I'm not sure if this message is hypocritical: I'm *not* slagging you off 
here Matt either, but then again I could have sent this to you personally. 
Hmmm...)

Anyway, like I commented to Tad: if you don't like the message, don't 
reply. If you MUST do so, please do it by email - it's part of the general 
etiquette.

Please don't take offense at the message.
Lee.

Matt Schalit wrote:

> In article <slrn966d6p.cvd.tadmc@tadmc26.august.net>, 
tadmc@augustmail.com says...
> 
>  
> > What is your point?
> > 
> > We want to know what it is called.
> > 
> > Your Camel quote above does not provide a name for it.
> > 
> > Do you know what the word "digraph" means? It doesn't sound like it...
> 
> 
> I don't know who you are or what you represent.
> This is the first post I've read from you, and you sound like
> an asshole.  I wonder how many other people think the same?
> 
> Btw, when someone puts something inside quotes, the result is
> called a quotation, dumbass.
> 
> Matt



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

Date: Wed, 17 Jan 2001 19:56:24 +0000
From: Lee Webb <lwebbee@britcomtele.comnotreal>
Subject: Re: What do you call the => operator?
Message-Id: <944tda$3ql$2@plutonium.btinternet.com>

Carefull Tad: I think you're having a go at the wrong person ;-)

Lee.

Tad McClellan wrote:

> Matt Schalit <mschalit@pacbell.net> wrote:
> >In article <slrn966d6p.cvd.tadmc@tadmc26.august.net>, 
tadmc@augustmail.com says...
> >
> > 
> >> What is your point?
> 
> 
> We are all still wondering what was the point of your followup?
> 
> If you were not suggesting "digraph" as a name, then I misread
> it and I apologize.
> 
> But please do share with us what you _were_ trying to say then.
> 
> If, OTOH, you _were_ suggesting "digraph" as a name, then you
> appear to not have picked up on the derision in the root
> article that started this thread. Did you read that post?

<snip>



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

Date: Wed, 17 Jan 2001 20:02:14 GMT
From: grehom@my-deja.com
Subject: Re: Win32 User
Message-Id: <944tnu$fg8$1@nnrp1.deja.com>

Open the Command window from the start button i.e.
     Start->Programs->MS-DOS Prompt
Type DOSKEY so you can use up arrow to redo commands etc
the type
   perl -w my_prog.pl input_file.ext > output_file.txt
where input files and output files are optional

In article <93606a$non$1@nnrp1.deja.com>,
  2obvious@my-deja.com wrote:
> I'm writing a Perl script on Windows 98 and I have a couple of basic
> questions.
>
> How can I make my script open a file in its native program?  For
> instance, how can I make my script open .doc file in Word?
>
> I can't figure out how to keep the DOS window that my scripts run in
> open when I make mistakes coding.  I attach <STDIN> to the bottom of
> all my scripts, but this is only helpful when my scripts are
> interpreted correctly.
>
> --E.
>
> Sent via Deja.com
> http://www.deja.com/
>


Sent via Deja.com
http://www.deja.com/


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

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 V10 Issue 83
*************************************


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