[8401] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2018 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 4 07:08:41 1998

Date: Wed, 4 Mar 98 04:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 4 Mar 1998     Volume: 8 Number: 2018

Today's topics:
        $$ref->{$_} undefined after passing by ref? (Jason Nugent)
    Re: Debugging Perl and extensions (Perl gurus please he <pcunnell+usenet@csfp.co.uk>
    Re: Detecting Perl version at compile time <qdtcall@esb.ericsson.se>
        Duplicating 'tail -n' functionality in Perl <u5ms@csc.liv.ac.uk>
    Re: Easy Unix Problem (4 U Guys) <ajohnson@gpu.srv.ualberta.ca>
        Help! qq~ ... ~ (perl newbie in trouble) <garyduke@nospam.idirect.com>
        HELP: PC-modem communication using Perl (Pablo Hortal)
        line number indication in Perl <Francky.Leyn@esat.kuleuven.ac.be>
        line number indication in Perl <Francky.Leyn@esat.kuleuven.ac.be>
        line number indication in Perl <Francky.Leyn@esat.kuleuven.ac.be>
        line number indication in Perl <Francky.Leyn@esat.kuleuven.ac.be>
        line number indication in Perl <Francky.Leyn@esat.kuleuven.ac.be>
    Re: Maintaining creation dates of files <qdtcall@esb.ericsson.se>
        modifying a line in a file (Byron Jones)
    Re: New to NT and perl (David Griffis)
    Re: Open file as a result of form input !! <cnwetzel@linguistik.uni-erlangen.de>
    Re: Open file as a result of form input !! <cnwetzel@linguistik.uni-erlangen.de>
    Re: Perl & MS SQL Server (David Griffis)
        perl compiler? ()
        Perl ODBC new user 'parse' problems (David Griffis)
    Re: perl tutorial <alleycat@scn.org>
    Re: Q: Emacs and making it indent perl code <qdtcall@esb.ericsson.se>
        Weird problem with LWP die and $SIG{"__DIE__"} <sbekman@iil.intel.com>
        What am I doing wrong? <etmgero@etm.ericsson.se>
    Re: What does this one-liner do? (Bart Lateur)
        Win32 Perl and ODBC New User Problems (David Griffis)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 4 Mar 1998 11:47:12 GMT
From: ap958@chebucto.ns.ca (Jason Nugent)
Subject: $$ref->{$_} undefined after passing by ref?
Message-Id: <6djf00$lp9$1@News.Dal.Ca>


	Hi folks,  I've been up all night, so I decided to seek some
wisdom.  I have a subroutine that I pass a hash by reference, like
this:

&sub{\%hash);

	And then I get the hash out of @_ inside the subroutine using:

	my ($ref) = shift;

 I can print the whole hash from here with a simple print stement:

 print %$ref; # prints whole thing.

My problem is that I am using the existance of keys in this hash as a
way to prevent an event from taking place.  just to make sure I can
still see the hash inside the foreach loop, I put a print statement
inside it:

foreach (@array){
 print %$ref;  # messy, but I can see it because it prints
 unless ($ref->{$_}){
  ... do something to $_ here.
 }
}

	Problem is, $ref->{$_} is being ignored.  My condition isn't
working. I've tried different formats of getting at the hash value,
like $$ref{$_}, and so on.  None of these work.  Does anyone have any
ideas?  I'd appreciate anything anyone could offer in the way of
guidance here.

		Thanks to all,

				Jason


--
---------------------
Jason Nugent, BSc(Hons)
ap958@chebucto.ns.ca         "Beneath this canvas monochrome 
Certified Webmaster           Wrapped in the shroud of this grey home
                              I'll paint a picture all my own
                              I'll paint a picture"
Live to ride,	 
  Ride to Live.	                    -Anacrusis
 	
********************************************************************
The Best Place for Sport on the net! - Sportscience www.sportsci.org
********************************************************************


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

Date: Wed, 04 Mar 1998 09:22:02 +0000
From: Paul Cunnell <pcunnell+usenet@csfp.co.uk>
To: gupit@yahoo.com
Subject: Re: Debugging Perl and extensions (Perl gurus please help)
Message-Id: <34FD1D3A.6F34@csfp.co.uk>

Ah, at last, an interesting question...

gupit@yahoo.com wrote:
> 
> Hello,
> I am trying to debug an extension I wrote for Perl. The extension is
> dynamically loadable. I built a Debugging version of perl (BTW any ideas on
> how to "make" a debugging version of perl share the libs etc of an existing
> normal version perl binary?) and ran it under gdb. However the function I
> wanted to break on in my .xs file is loaded dynamically. Is there a procedure
> to be followed to allow setting breakpoints at these type of functions?

Yup. The trick is to use _both_ the perl and the unix debugger (in my
case,
dbx on Solaris, but the basic idea's the same)...[ my comments in
brackets ]

% gdb perl

[ debugger loads perl & libc.so et. al. ]

(gdb) run -d myprog

[ shared libs 'use'd by myprog loaded ]

  DB<1> ^C

[ interrupt perl interpreter, back to gdb ]

(gdb) b XS_Mymodule_new

[ set a breakpoint in a function in Mymodule::new - this works correctly
  because the dynamic loader has by now loaded the library. Note that
  you'll probably need to reset this breakpoint if you rerun your
  program, as the dynamic loader will reload your extension module,
  and trash the breakpoint you set ]

(gdb) cont

[ back to perl debugger ]

  DB<1> c

[ continue program. Eventually (hopefully) you'll hit the 
  carefully prepared breakpoint set above. ]

Oh and you did do perl Makefile.PL OPTIMIZE=-g, didn't you ?

> 
> I also tried building a statically linked version. It does break, but
> somewhere inside the function. Stepping a few times starts the execution
> of the function. But it keeps on hanging in the middle. Any ideas?
> 
> While I am at it, let me ask the question which prompted me to try to debug
> perl.
> I am returning a reference to a hash of hashes from a C function. I declared
> the top hash mortal.
> One of the nested data structure is an array. I create new SV's and push them
> in this array. If I create mortal versions of these SV's, I get unknowns in my
> perl script.
> When I looked at av_push, I found that only the pointer to the SV is stored in
> the array entry. That would explain unknown since the SV is freed after my C
> functions is returned.
> But then when I change the original SV, the array entry doesn't change (whcih
> is correct). What exactly happens when I push a scalar and change the scalar?
> Is there some magic going on?

Probably. It's hard to say without actually seeing some code. I do know
that you have to be very careful about what you make mortal when
constructing
complex return structures. I normally make sure I run a soak test after
I
think it's working, just to make sure it's not leaking horribly - and
this
is the sort of thing Purify can't find very well, because often what you
leak is in perl-land, rather than malloc-land.

Paul.

-- 
Paul Cunnell CSFB RDG (pcunnell+usenet@csfp.co.uk) +44 171 888 2946


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

Date: 04 Mar 1998 10:12:22 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Detecting Perl version at compile time
Message-Id: <iswweau8eh.fsf@godzilla.kiere.ericsson.se>

Ritchard Shadian <rshadian@hawaii.edu> writes:

> Is there some way to detect which version of Perl is running before
> the script is compiled?

Yes, there is -- in Perl version 5 and later.

> It would be better to catch it early and return a nice formatted
> error mesage rather than leaving the user to ponder over all the
> "syntax error" messages produced when module subroutines are called.

Replace the Perl4 binary with this script:

#!/bin/sh
echo "Perl version 4 is many years old, has security vulnerabilities and"
echo "no attempt will ever be made to ensure that it survives the year"
echo "2000 intact. Do not use it. Upgrade to a less ancient version."
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Tue, 3 Mar 1998 14:39:29 GMT
From: Matt Sephton <u5ms@csc.liv.ac.uk>
Subject: Duplicating 'tail -n' functionality in Perl
Message-Id: <34FC1621.5E2F@csc.liv.ac.uk>

I need to get the last few thousand lines of a couple-of-hundred MB
access_log file, which means that the standard 'tail -3000' command is
unsuitable with it's limitation of 20k. I have also tried using 'wc -l'
and then 'calc' and 'sed' to compute the number of lines in the file and
then to get the last few thousand.

Is there any way of acieving this in Perl 5? Or does anybody know of a
version of tail with no buffer size limit ?

Any help would be appreciated.

Regards,
Matt
-- 
u5ms@csc.liv.ac.uk
http://www.csc.liv.ac.uk/~u5ms/


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

Date: Wed, 04 Mar 1998 02:45:43 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Easy Unix Problem (4 U Guys)
Message-Id: <34FD14B7.4A593994@gpu.srv.ualberta.ca>

James Ludlow wrote:
!
! Elf Sternberg wrote:
! [snip]
! > To those reading this on comp.lang.perl, is there an easier way
! > to split a line 'every nth character' without the cockamamie
! > while/for/substr construction I've got up there?  I actually
! > have wracked my brains on this before without coming up with a
! > satisfactory answer.
! 
! I'd still love to see this as a one liner, but here's my version
! of it:

[snip] 

hmm, yours could be shortened (and sped up) to:

#!/usr/bin/perl -w
$_ = "01234567890abcdefghijklmnop";
$n=2;
print join(' ',/(.{0,$n})/g),"\n";

and an unpack version should get a bit more
speed, especially on longer strings:

#!/usr/bin/perl -w
$_ = "01234567890abcdefghijklmnop";
($n,$l)=(2,length);
print join(' ',unpack "a$n"x(int(($l/$n))+($l%$n?1:0)),$_),"\n";

regards
andrew


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

Date: Wed, 4 Mar 1998 05:31:34 -0500
From: "Bubba" <garyduke@nospam.idirect.com>
Subject: Help! qq~ ... ~ (perl newbie in trouble)
Message-Id: <6djare$qta$1@newsmaster.pathcom.com>

i have a block of HTML text I want to output to the browser

I have been using

print qq~ [all the text] ~;

to do this, and the text compiles fine when in a .pl script by itself. (ie
the only thing in the script is the print qq~ ... ~;)

But in my script,

I keep getting errors like

Bare word found where operator expected at....

where i have a block of HTML text I want to output to the browser. It's
treating it like code!!! why??

What am I doing wrong?


Please send replies to the newsgroup and if you wish to garyduke@idirect.com





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

Date: 4 Mar 1998 10:08:31 GMT
From: mcai3ph2@ist4.co.umist.ac.uk (Pablo Hortal)
Subject: HELP: PC-modem communication using Perl
Message-Id: <6dj96v$3q7$2@probity.mcc.ac.uk>

Hi,

Does anybody know how to communicate between a PC and a modem,
using a Perl CGI script?

Thanks very much,
Pablo.



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

Date: Wed, 04 Mar 1998 10:46:29 +0100
From: Francky Leyn <Francky.Leyn@esat.kuleuven.ac.be>
Subject: line number indication in Perl
Message-Id: <34FD22F5.D076822F@esat.kuleuven.ac.be>

Hello,

I'm looking for a way to specify in Perl a line number indication. Does
this
exist in Perl, and if so, what is the syntax?

I'm using the literate programming tool noweb to document my Perl
programs. http://www.cs.virginia.edu/~nr/noweb/intro.html
This allows me to mix Perl code with LaTeX documentation in a single
source file.
The problem with this is that when I get a Perl error message on line
xxx, that this line number doesn't correspond with the line number
in the noweb file. In order to know about which line it goes, I have
to look into the code extracted from the noweb file. The solution is
to let noweb emmit line number indications. It can do that in an
automated way. However what is the Perl syntax for this?

Best regards,

Francky

_____________________________________________________________________________

 Francky Leyn                      URL:
http://www.esat.kuleuven.ac.be/~leyn/
 K.U.Leuven - ESAT MICAS           E-mail :
Francky.Leyn@esat.kuleuven.ac.be
 Kardinaal Mercierlaan 94 - 91.21  Tel    : ++32 - (0)16  32.10.85
__o
 B-3001 Heverlee - Belgium         Fax    : ++32 - (0)16  32.19.75
\<,
____________________________________________________________________()/
()__




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

Date: Wed, 04 Mar 1998 10:50:09 +0100
From: Francky Leyn <Francky.Leyn@esat.kuleuven.ac.be>
Subject: line number indication in Perl
Message-Id: <34FD23D1.D5B41B9E@esat.kuleuven.ac.be>

Hello,

I'm looking for a way to specify in Perl a line number indication. Does
this
exist in Perl, and if so, what is the syntax?

I'm using the literate programming tool noweb to document my Perl
programs. http://www.cs.virginia.edu/~nr/noweb/intro.html
This allows me to mix Perl code with LaTeX documentation in a single
source file.
The problem with this is that when I get a Perl error message on line
xxx, that this line number doesn't correspond with the line number
in the noweb file. In order to know about which line it goes, I have
to look into the code extracted from the noweb file. The solution is
to let noweb emmit line number indications. It can do that in an
automated way. However what is the Perl syntax for this?

Best regards,

Francky

_____________________________________________________________________________

 Francky Leyn                      URL:
http://www.esat.kuleuven.ac.be/~leyn/
 K.U.Leuven - ESAT MICAS           E-mail :
Francky.Leyn@esat.kuleuven.ac.be
 Kardinaal Mercierlaan 94 - 91.21  Tel    : ++32 - (0)16  32.10.85
__o
 B-3001 Heverlee - Belgium         Fax    : ++32 - (0)16  32.19.75
\<,
____________________________________________________________________()/
()__




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

Date: Wed, 04 Mar 1998 10:50:38 +0100
From: Francky Leyn <Francky.Leyn@esat.kuleuven.ac.be>
Subject: line number indication in Perl
Message-Id: <34FD23EE.A29D31A1@esat.kuleuven.ac.be>

Hello,

I'm looking for a way to specify in Perl a line number indication. Does
this
exist in Perl, and if so, what is the syntax?

I'm using the literate programming tool noweb to document my Perl
programs. http://www.cs.virginia.edu/~nr/noweb/intro.html
This allows me to mix Perl code with LaTeX documentation in a single
source file.
The problem with this is that when I get a Perl error message on line
xxx, that this line number doesn't correspond with the line number
in the noweb file. In order to know about which line it goes, I have
to look into the code extracted from the noweb file. The solution is
to let noweb emmit line number indications. It can do that in an
automated way. However what is the Perl syntax for this?

Best regards,

Francky

_____________________________________________________________________________

 Francky Leyn                      URL:
http://www.esat.kuleuven.ac.be/~leyn/
 K.U.Leuven - ESAT MICAS           E-mail :
Francky.Leyn@esat.kuleuven.ac.be
 Kardinaal Mercierlaan 94 - 91.21  Tel    : ++32 - (0)16  32.10.85
__o
 B-3001 Heverlee - Belgium         Fax    : ++32 - (0)16  32.19.75
\<,
____________________________________________________________________()/
()__




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

Date: Wed, 04 Mar 1998 10:56:22 +0100
From: Francky Leyn <Francky.Leyn@esat.kuleuven.ac.be>
Subject: line number indication in Perl
Message-Id: <34FD2546.E0C0FFC@esat.kuleuven.ac.be>

Hello,

I'm looking for a way to specify in Perl a line number indication. Does
this
exist in Perl, and if so, what is the syntax?

I'm using the literate programming tool noweb to document my Perl
programs. http://www.cs.virginia.edu/~nr/noweb/intro.html
This allows me to mix Perl code with LaTeX documentation in a single
source file.
The problem with this is that when I get a Perl error message on line
xxx, that this line number doesn't correspond with the line number
in the noweb file. In order to know about which line it goes, I have
to look into the code extracted from the noweb file. The solution is
to let noweb emmit line number indications. It can do that in an
automated way. However what is the Perl syntax for this?

Best regards,

Francky

_____________________________________________________________________________

 Francky Leyn                      URL:
http://www.esat.kuleuven.ac.be/~leyn/
 K.U.Leuven - ESAT MICAS           E-mail :
Francky.Leyn@esat.kuleuven.ac.be
 Kardinaal Mercierlaan 94 - 91.21  Tel    : ++32 - (0)16  32.10.85
__o
 B-3001 Heverlee - Belgium         Fax    : ++32 - (0)16  32.19.75
\<,
____________________________________________________________________()/
()__




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

Date: Wed, 04 Mar 1998 10:57:39 +0100
From: Francky Leyn <Francky.Leyn@esat.kuleuven.ac.be>
Subject: line number indication in Perl
Message-Id: <34FD2593.DAB41B9F@esat.kuleuven.ac.be>

Hello,

I'm looking for a way to specify in Perl a line number indication. Does
this
exist in Perl, and if so, what is the syntax?

I'm using the literate programming tool noweb to document my Perl
programs. http://www.cs.virginia.edu/~nr/noweb/intro.html
This allows me to mix Perl code with LaTeX documentation in a single
source file.
The problem with this is that when I get a Perl error message on line
xxx, that this line number doesn't correspond with the line number
in the noweb file. In order to know about which line it goes, I have
to look into the code extracted from the noweb file. The solution is
to let noweb emmit line number indications. It can do that in an
automated way. However what is the Perl syntax for this?

Best regards,

Francky

_____________________________________________________________________________

 Francky Leyn                      URL:
http://www.esat.kuleuven.ac.be/~leyn/
 K.U.Leuven - ESAT MICAS           E-mail :
Francky.Leyn@esat.kuleuven.ac.be
 Kardinaal Mercierlaan 94 - 91.21  Tel    : ++32 - (0)16  32.10.85
__o
 B-3001 Heverlee - Belgium         Fax    : ++32 - (0)16  32.19.75
\<,
____________________________________________________________________()/
()__




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

Date: 04 Mar 1998 09:58:10 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Maintaining creation dates of files
Message-Id: <isyayqu925.fsf@godzilla.kiere.ericsson.se>

Alex Schajer <alexs@online.emap.com> writes:

> When this process is run the files get a new creation date - that of the
> batch process. Is there anyway to keep or replace with the original
> creation date?

Correct answer: Assuming you're talking about Unix, no there is no way
to do that, for the simple reason that Unices doesn't store the
creation time anywhere.

Answer to what you thought you were asking: You can modify the
_change_ time with the utime function. It's described in the manual,
which you should have read before you posted here.
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Wed, 04 Mar 1998 16:25:50 +0800
From: byronj@nd.edu.au (Byron Jones)
Subject: modifying a line in a file
Message-Id: <byronj-0403981625500001@t-man.nd.edu.au>

greets.

first up, i'm a pascal programmer at heart, so my perl code sucks.  but i
wanna learn, so ..

i've got a program that stores its data in the same format as
/etc/passwd.  i can read and append to this file without problems (easy). 
is there any way of modifing/replacing/deleting a single line in the file?

in pascal, i'd have to read through each line, writing to a temp file, and
modify the target line as it is read.  then remove the orig file and
rename the temp file.

in perl, being so full of funk, has gotta have a better way.

-[ Byron Jones ]--------------------------------------------
   Communications Manager    byronj@nd.edu.au
   Notre Dame University     http://www.nd.edu.au/byronj/
   Perth, Western Australia  ftp://t-man.nd.edu.au/pub/
-[ "Dinosaurs have evolved from Peanut Butter" Symon Aked ]-


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

Date: Wed, 04 Mar 1998 05:46:20 GMT
From: davidg@teleprompt.com (David Griffis)
Subject: Re: New to NT and perl
Message-Id: <34fcea3b.1945807@news.infinex.com>

If you go to www.perl.com and follow the links to Database FAQ's you
should arrive at Dave Roth's web page which gives you the latest
Activeware Win32 and ODBC extension for Perl.  I just went through
that route.  Getting some 'parse' errors.  Not sure what the problem
is.  Anyone out there know?

David Griffis
TelePrompt Software

On Sun, 01 Mar 1998 19:02:51 -0600, Periklis Moutzouros
<perry@twowaycom.com> wrote:

>I need someone to point me in the direction of the typical resources for
>getting perl to run on NT.
>I want to accomplish the basic stuff: I want to run CGI scripts with my
>web server(IIS) written in perl.
>
>I am new to both perl and NT. I usually do most of this stuff in a
>cgi-bin directory on my Linux box, and I noticed that a cgi-bin
>directory is included with my IIS from Microsoft. I am running service
>pack 3, and all I need is a URL to a NT perl faq, or just where to get
>perl for NT.
>
>I really need to get some of these web sites tested at home, and they
>require cgi scripts in perl!
>
>Thanks for the help
>
>Perry Moutzouros
>perry@altadv.com
>
>



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

Date: Wed, 04 Mar 1998 10:28:34 +0100
From: Christian Wetzel <cnwetzel@linguistik.uni-erlangen.de>
Subject: Re: Open file as a result of form input !!
Message-Id: <34FD1EC2.1097@linguistik.uni-erlangen.de>

Baher M. Safwat:

> I designed a simple page to get users input
> as a result of that input I will open some file and add to it
> but ...
> it generate a server error
> [...]
> $filename =3D $FORM{"filename"};
> open HAND1, $filename or die "Can not open /etc/shadow: $!\n";
>         :
>        <CODE GOES HERE>
>         :
>         :
> close HAND1;

Security question: It seems to me that you let the www
user determine the file to open. =


  Never do something like this!

If he simply puts something like "rm -rf / |" in the
"filename" field, he will delete all files that your
web server has write permission for (probably the whole
website). And he can do a lot of other things, too,
like sending himself E-Mails containing an overview
of your system etc. etc.

Please read =


Christian
-- =

  Kr=E4ftig mit beiden H=E4nden dr=FCcken, um den inneren Beutel
  zu zerbrechen. Dann den Beutel kurz sch=FCtteln.


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

Date: Wed, 04 Mar 1998 10:38:45 +0100
From: Christian Wetzel <cnwetzel@linguistik.uni-erlangen.de>
Subject: Re: Open file as a result of form input !!
Message-Id: <34FD2125.2A7B@linguistik.uni-erlangen.de>

I wrote:

> Please read

 ... and touched the "send" button instead of looking for
my cgi security bookmark. 

Here it is:

  The World Wide Web Security FAQ
  http://www.w3.org/Security/Faq/www-security-faq.html#contents

It covers both general issues and perl-related security.

Christian
-- 
  Aufstellen auf rutschfester Unterlage wird empfohlen.


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

Date: Wed, 04 Mar 1998 05:43:17 GMT
From: davidg@teleprompt.com (David Griffis)
Subject: Re: Perl & MS SQL Server
Message-Id: <34fce98d.1771116@news.infinex.com>

I had problems too getting it to work.  Got a 'parse' error.  Not sure
why.  Were you able to run any Perl programs.  What error did you get
after configuring your ODBC DNS and Perl ODBC extension?

David Griffis
TelePrompt Software


On Fri, 27 Feb 1998 16:09:46 -0800, "Sebastian"
<sebfrey@advancedh2o.com> wrote:

>
>O' NT Perl Gurus -
>
>I've just spent the better part of the day downloading various perl modules
>and whatnot in the hopes of writing a few scripts to access data stored in a
>Microsoft SQL Server 6.5 database.  OK, I'll come right out and say it:  I
>can't even BEGIN to get it working.  I've tried Win32::ODBC, MSSQL/DBLib,
>and the ASP/ADO Examples that come with (I think) PerlScript.  None of them
>work, for a variety of reasons which I'll spare you.
>
>What I would like to know is:  is there a one-stop tutorial for just this
>kind of thing?  I've been going on a few snippets of HTML documentation here
>and the occaisional text file there, but have yet to find any "grand
>unifying tutorial" that could take me through this step-by-step.  Is there
>an URL that has this, or a book I can buy?
>
>And does everyone have a preferred method for doing this?  Is Win32::ODBC
>the most popular?
>
>Any advice anyone can provide will be _greatly_ appreciated!
>
>Thanks in advance.
>
>--Sebastian Frey
>
>



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

Date: 4 Mar 1998 11:02:50 GMT
From: cyhsu@eagle.seed.net.tw ()
Subject: perl compiler?
Message-Id: <6djccq$eb7@news.seed.net.tw>

Is there a perl compiler?
If so, how/where can I get it?

Thanks.

Jun-ming


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

Date: Wed, 04 Mar 1998 05:39:47 GMT
From: davidg@teleprompt.com (David Griffis)
Subject: Perl ODBC new user 'parse' problems
Message-Id: <34fce8af.1549668@news.infinex.com>

Installed Activeware Win32 5.003 build 315 and Dave Roth's ODBC
extension to use with my Oracle 733 ODBC configuration but get 'parse'
error.  What could be wrong?

Thanks,

David Griffis
TelePrompt Software


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

Date: Tue, 03 Mar 1998 20:22:18 -0800
From: Beeb <alleycat@scn.org>
To: Luis Espinal <lespin03@solix.fiu.edu>
Subject: Re: perl tutorial
Message-Id: <34FCD6FA.7550@scn.org>

Patrick M. Ryan from NASA has written what has been called "a wonderful
21 page introduction to the Perl language for the experienced
programmer".  It is free to download from
www.eecs.nwu.edu/perl/SAG-perl.ps.  I haven't been able to read it
myself because it is postscript printer format, and I can't make heads
or tails out of the "Ghostwriter" postscript converter.  DOES ANYBODY
HAVE THIS MANUAL CONVERTED TO A WINDOWS/95 FRIENDLY FORMAT WHO WOULD
E-MAIL IT TO ME, PLEASE?  You will have my eternal gratitude!

Bob B.
alleycat@scn.org


Luis Espinal wrote:
> 
> Hi guys,
> 
> I'm looking for a free, downloadable tutorial on Perl. I would prefer if it
> is
> in TeX, PostScript, HTML or some other markup language (a plain-vanela
> text file would be "digestable", too:) I've got several tutorials in Awk
> and
> Sed but none on Perl.
> 
> If you know of any, please let me know.
> 
> Luis Espinal.
> 
> --
> What does not kill us, makes us stronger.
> Nietzsche.
> 
> L^3 = Long Live Linux


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

Date: 04 Mar 1998 10:13:32 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Q: Emacs and making it indent perl code
Message-Id: <isvhtuu8cj.fsf@godzilla.kiere.ericsson.se>

brieweb@aol.com (Brieweb) writes:

> I figured out how to invoke perl mode with m-x perl-mode. I tried
> this and I am

Get cperl-mode from CPAN and use that instead. It's much, much better.
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Wed, 04 Mar 1998 12:41:54 +0200
From: Bekman Stanislav <sbekman@iil.intel.com>
Subject: Weird problem with LWP die and $SIG{"__DIE__"}
Message-Id: <34FD2FF2.2781@iil.intel.com>

Hi,

We have a weird problem with LWP::UserAgent , LWP (5.20)

The following snippet works OK!

use LWP::UserAgent;
my $ua=new LWP::UserAgent;
$ua->agent("AAA/0.1" . $ua->agent);

When we add:

 $SIG{"__DIE__"} =  sub {
      my $error = shift;
        print "Error: $error\n";
      exit 0;
    };
 
The same script dies with Error: Can't locate
auto/LWP/UserAgent/DESTROY.al in @INC at /usr/lib/perl5/AutoLoader.pm
line 30.

replacing exit 0 -> exit 1 adds
Error: Callback called exit.
to the original error...

So I have 2 problems to solve:

1. Why it tries to locate DESTROY.al? It's a standard object and should
be destroyed by Perl.  Something wrong with LWP? I did a whole new
reinstallation and all make test passed successfully
(I have checked, there is no DESTROY.al in auto/LWP/UserAgent/)

2. Why with $SIG{"__DIE__"} it catches the die() on exit and without it
doesn't? 
We use (-w) in the perl calling line.

One could say just remove the $SIG{"__DIE__"} if it exits cleanly
without it but we can't since it's used in CGI script and we report all
the errors to the browser thru $SIG{"__DIE__"} with a little more
sophisticated sub {} with http header and some html...

Any clues how to solve 1, 2 or both?

(we use all the latest perl 5.004 and modules, I've checked it!)

Thanks in advance!


______________________________________________________________________
Stas Bekman     mailto:sbekman@iil.intel.com [just another webmaster]
Home Page:      http://www.eprotect.com/stas
A must visit: 	http://www.eprotect.com/stas/TULARC (Java,CGI,PC,Linux)
Linux-il Home:  http://www.linux.org.il/		    
    
Linux receives a 'Product of the Year Award' for Best Technical Support
http://www.infoworld.com/cgi-bin/displayTC.pl?97poy.supp.htm


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

Date: Wed, 04 Mar 1998 10:47:21 +0100
From: Geert Roovers <etmgero@etm.ericsson.se>
Subject: What am I doing wrong?
Message-Id: <34FD2329.4E33@etm.ericsson.se>

Hi... in my opinion, the next script should fetch a number form a file,
increase it, and overwrite the file with this new number. Perl does not
agrre with me though...

open(LOGFILE, "+>count.log") || die "Horribly";
$a = <LOGFILE>;
print(++$a);
print LOGFILE ($a);
close(LOGFILE)

(I also tried open(LOGFILE, "+<count.log"); and open(LOGFILE,
"+>>count.log);)

~Geert


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

Date: Wed, 04 Mar 1998 11:21:00 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: What does this one-liner do?
Message-Id: <34fd0460.870176@news.tornado.be>

Uri Guttman <uri@sysarch.com> wrote:

>$foo = ( @array ) is the last element of @array

??? Are you sure? This sure doesn't make sense to me. It looks like
you're confusing the comma operator with comma's separating arry items.

	#! perl
	@ary = (123,456,789);
	$scalar = (@ary);
	print $scalar;

This prints 3 on my system. Unless there are differences between
versions of Perl in this regard...

	Bart.


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

Date: Wed, 04 Mar 1998 05:37:05 GMT
From: davidg@teleprompt.com (David Griffis)
Subject: Win32 Perl and ODBC New User Problems
Message-Id: <34fce5be.796335@news.infinex.com>

I'm trying to get Activeware Win32 Perl 5.003 build 315 and Dave
Roth's ODBC extention working with my NT 4.0 ODBC for Oracle 733 but
I'm getting a 'parse error'.  What could I have done wrong?




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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 2018
**************************************

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