[15517] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2927 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 2 18:10:39 2000

Date: Tue, 2 May 2000 15:10:24 -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: <957305424-v9-i2927@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 2 May 2000     Volume: 9 Number: 2927

Today's topics:
    Re: Javascript call Perl CGI schnurmann@my-deja.com
    Re: Javascript call Perl CGI <jeff@vpservices.com>
    Re: Javascript call Perl CGI (Lee)
    Re: Javascript call Perl CGI <lauren_smith13@hotmail.com>
    Re: Javascript call Perl CGI <you.will.always.find.him.in.the.kitchen@parties>
    Re: oct() function (Tad McClellan)
    Re: oct() function <franl-removethis@world.omitthis.std.com>
    Re: oct() function <uri@sysarch.com>
    Re: oct() function <iltzu@sci.invalid>
    Re: oct() function <lr@hpl.hp.com>
    Re: Perl, limiting displayed decimal places <lr@hpl.hp.com>
        printing to a jetdirect device from perl -- help <alager@csuchico.edu>
    Re: Problem with $ sign in string <aqumsieh@hyperchip.com>
    Re: Puzzled - Please help. <sparky@alt-usage-english.org>
    Re: Puzzled - Please help. <aqumsieh@hyperchip.com>
    Re: Puzzled - Please help. (Tad McClellan)
    Re: RE Question <uri@sysarch.com>
    Re: RE Question <jeff@vpservices.com>
    Re: References and hashes (Craig Berry)
        reg expressions assistance <skpurcell@hotmail.com>
    Re: reg expressions assistance <lauren_smith13@hotmail.com>
    Re: reg expressions assistance <aqumsieh@hyperchip.com>
        Regexp speed (was: Help: bol regexp in split string) <occitan@esperanto.org>
        Saving Uploaded Files using CGI.pm (Mike)
    Re: Specifying timeout with sockets <dodd@ll.mit.edu>
        Stuck with my script! <mouimet@direct.ca>
    Re: VMS Perl system() truncating lines <lr@hpl.hp.com>
    Re: What debugger do people use for Perl? <sariq@texas.net>
    Re: What debugger do people use for Perl? (Tad McClellan)
    Re: What debugger do people use for Perl? <lauren_smith13@hotmail.com>
        Where are the FAQ's <skpurcell@hotmail.com>
    Re: Where are the FAQ's <jeff@vpservices.com>
    Re: Where are the FAQ's <lauren_smith13@hotmail.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 02 May 2000 18:18:44 GMT
From: schnurmann@my-deja.com
Subject: Re: Javascript call Perl CGI
Message-Id: <8en65i$j3u$1@nnrp1.deja.com>

Wow!  Two people who cannot read.  I did not ask anything about passing
a parameter to a CGI programme.  I want my JavaScript that the client
runs to CALL a cgi programme that is written in Perl.  I want an image
button to call a Javascript function in the onClick method, do some
processing and ask the user if they want to continue, and if yes, call
a CGI programme.  Ie- do a "submit".

In article <8en2lb$ivl$1@brokaw.wa.com>,
  "Lauren Smith" <lauren_smith13@hotmail.com> wrote:
>
> <schnurmann@my-deja.com> wrote in message
> news:8emv1u$ak2$1@nnrp1.deja.com...
> > In article <nmCP4.1871$jY2.258010@den-news1.rmi.net>,
> >   "Tim Cuffel" <tcuffel@exactis.com> wrote:
> > > schnurmann@my-deja.com wrote in message <8ekrd4
> > $pq$1@nnrp1.deja.com>...
> > > >How might a Javascript call a CGI Perl script?
> > >
> > > Note this is not a Perl question.  In future, please consider
posting
> > > to a different group, such as comp.infosystems.www.authoring.cgi.
> > >
> > >
> > I am not sure to what question you wrote your answer, but it wasn't
> > mine.
> >
>
> You are asking a CGI question (how to pass a parameter to a CGI
program), so
> asking it in a CGI newsgroup would get you much more information than
asking
> here would.
>
> Lauren
>
>


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


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

Date: Tue, 02 May 2000 11:48:14 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Javascript call Perl CGI
Message-Id: <390F22EE.9651873C@vpservices.com>

schnurmann@my-deja.com wrote:
> 
> Wow!  Two people who cannot read.  I did not ask anything about passing
> a parameter to a CGI programme.  I want my JavaScript that the client
> runs to CALL a cgi programme that is written in Perl.  I want an image
> button to call a Javascript function in the onClick method, do some
> processing and ask the user if they want to continue, and if yes, call
> a CGI programme.  Ie- do a "submit".

Wow, one person who can read but can't understand!

> > <schnurmann@my-deja.com> wrote in message

> > > > >How might a Javascript call a CGI Perl script?

If your question is about getting Javascript to call something (or
getting Javascript to do anything else for that matter), there is no
point whatsoever in asking in a Perl newsgroup.  Two people pointed this
out politely to you and you were rude to both of them.  So I will not be
polite.  Go somewhere else, jerk!

-- 
Jeff


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

Date: 2 May 2000 18:42:48 GMT
From: feigenb@is02.fas.harvard.edu (Lee)
Subject: Re: Javascript call Perl CGI
Message-Id: <slrn8gu8d8.g95.feigenb@is02.fas.harvard.edu>

The fact remains that this is a Javascript question only, and not
a Perl question in the least.

Lee

On Tue, 02 May 2000 18:18:44 GMT, schnurmann@my-deja.com <schnurmann@my-deja.com> wrote:
>Wow!  Two people who cannot read.  I did not ask anything about passing
>a parameter to a CGI programme.  I want my JavaScript that the client
>runs to CALL a cgi programme that is written in Perl.  I want an image
>button to call a Javascript function in the onClick method, do some
>processing and ask the user if they want to continue, and if yes, call
>a CGI programme.  Ie- do a "submit".
>
>In article <8en2lb$ivl$1@brokaw.wa.com>,
>  "Lauren Smith" <lauren_smith13@hotmail.com> wrote:
>>
>> <schnurmann@my-deja.com> wrote in message
>> news:8emv1u$ak2$1@nnrp1.deja.com...
>> > In article <nmCP4.1871$jY2.258010@den-news1.rmi.net>,
>> >   "Tim Cuffel" <tcuffel@exactis.com> wrote:
>> > > schnurmann@my-deja.com wrote in message <8ekrd4
>> > $pq$1@nnrp1.deja.com>...
>> > > >How might a Javascript call a CGI Perl script?
>> > >
>> > > Note this is not a Perl question.  In future, please consider
>posting
>> > > to a different group, such as comp.infosystems.www.authoring.cgi.
>> > >
>> > >
>> > I am not sure to what question you wrote your answer, but it wasn't
>> > mine.
>> >
>>
>> You are asking a CGI question (how to pass a parameter to a CGI
>program), so
>> asking it in a CGI newsgroup would get you much more information than
>asking
>> here would.
>>
>> Lauren
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.


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

Date: Tue, 2 May 2000 11:54:14 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Javascript call Perl CGI
Message-Id: <8en87t$j0q$1@brokaw.wa.com>


<schnurmann@my-deja.com> wrote in message
news:8en65i$j3u$1@nnrp1.deja.com...
> Wow!  Two people who cannot read.  I did not ask anything about passing
> a parameter to a CGI programme.  I want my JavaScript that the client
> runs to CALL a cgi programme that is written in Perl.  I want an image
> button to call a Javascript function in the onClick method, do some
> processing and ask the user if they want to continue, and if yes, call
> a CGI programme.  Ie- do a "submit".

How would you do it if the CGI program was written in C?

That was rhetorical because...
*plonk*

Lauren





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

Date: Wed, 3 May 2000 08:34:33 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Javascript call Perl CGI
Message-Id: <957299613.220368@shelley.paradise.net.nz>


<schnurmann@my-deja.com> wrote in message
news:8en65i$j3u$1@nnrp1.deja.com...
> Wow!  Two people who cannot read.  I did not ask anything about passing
> a parameter to a CGI programme.  I want my JavaScript that the client
> runs to CALL a cgi programme that is written in Perl.  I want an image
> button to call a Javascript function in the onClick method, do some
> processing and ask the user if they want to continue, and if yes, call
> a CGI programme.  Ie- do a "submit".

You have no idea how to post, how to reply, how to read, how to use
javascript, what Perl is and what CGI is.

On top of all that, you are rude and ignorant.  Is it any wonder you are
having problems?




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

Date: Tue, 2 May 2000 13:02:53 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: oct() function
Message-Id: <slrn8gu2ht.53v.tadmc@magna.metronet.com>

On Tue, 2 May 2000 08:36:57 -0700, Tom Phoenix <rootbeer@redcat.com> wrote:
>On Tue, 2 May 2000 c_guex@my-deja.com wrote:
>
>> I've try:
>> 
>> oct "0b11", but the result is always 0. Is the
>> structure false ?
>
>That's a new feature in 5.6.0 - are you using an earlier version of perl?


It appears that this

   "If EXPR starts off with C<0b>, it is interpreted as a binary string"

made it into perlfunc for 5.005_03, but not into the _code_
for that version.

The above works with 5.6, but not with 5.005_03 (even though
it says it does).


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 2 May 2000 19:37:04 GMT
From: Francis Litterio <franl-removethis@world.omitthis.std.com>
Subject: Re: oct() function
Message-Id: <m3bt2o68wv.fsf@franl.andover.net>

c_guex@my-deja.com writes:

> I try to obtain the decimal value of a binary
> string.

Other posters have answered this question, so I'll ask a related one:

What possible oddity of Perl parsing explains the output of this Perl
program:

	#!/usr/bin/perl -w
	print oct(0x11), "\n";

The output is:

	15

Yes, I know oct takes a string instead of a number, but Perl 5.00503 gave
no warnings or syntax errors about this code, so it's making sense out of
my code, just not the same sense I make out of it. :-)
--
Francis Litterio
franl-removethis@world.std.omit-this.com
PGP public keys available on keyservers.


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

Date: Tue, 02 May 2000 20:08:10 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: oct() function
Message-Id: <x7ln1syau0.fsf@home.sysarch.com>

>>>>> "FL" == Francis Litterio <franl-removethis@world.omitthis.std.com> writes:

  FL> 	print oct(0x11), "\n";

  FL> The output is:

  FL> 	15

  FL> Yes, I know oct takes a string instead of a number, but Perl
  FL> 5.00503 gave no warnings or syntax errors about this code, so it's
  FL> making sense out of my code, just not the same sense I make out of
  FL> it. :-)

0x11 is 17 in decimal. so the string 17 is passed to oct which is 15
decimal which is what is printed.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 2 May 2000 20:14:49 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: oct() function
Message-Id: <957298146.391@itz.pp.sci.fi>

In article <m3bt2o68wv.fsf@franl.andover.net>, Francis Litterio wrote:
>What possible oddity of Perl parsing explains the output of this Perl
>program:
>
>	#!/usr/bin/perl -w
>	print oct(0x11), "\n";
>
>The output is:
>
>	15

Perfectly obvious:  oct(0x11) == oct(17) == oct('17') == 017 == 15

 - "Doctor, it hurts when I do this!"
 - "Then stop doing that."

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Tue, 2 May 2000 13:42:40 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: oct() function
Message-Id: <MPG.1378dd98484c674f98a9ce@nntp.hpl.hp.com>

In article <m3bt2o68wv.fsf@franl.andover.net> on Tue, 2 May 2000 
19:37:04 GMT, Francis Litterio <franl-removethis@world.omitthis.std.com> 
says...

 ...

> What possible oddity of Perl parsing explains the output of this Perl
> program:
> 
> 	#!/usr/bin/perl -w
> 	print oct(0x11), "\n";
> 
> The output is:
> 
> 	15
> 
> Yes, I know oct takes a string instead of a number, but Perl 5.00503 gave
> no warnings or syntax errors about this code, so it's making sense out of
> my code, just not the same sense I make out of it. :-)

It is perfectly clear.  As you say, oct() expects a string.  The hex 
literal 0x11 is converted to the internal representation of its value 
(11 hex == 17 decimal), which then gets converted to the string '17'.  
Now oct('17') interprets the string as an octal number (no leading 0 is 
needed), and converts it to the internal representation of its value (17 
octal == 15 decimal).  So print outputs the string '15'.

Wasn't that perfectly clear? :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 2 May 2000 13:37:29 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Perl, limiting displayed decimal places
Message-Id: <MPG.1378dc64ab15526d98a9cd@nntp.hpl.hp.com>

In article <8eme7d$i2s$1@porthos.nl.uu.net> on Tue, 2 May 2000 14:35:05 
+0200, Michael Schlueter <michael.schlueter@philips.com> says...

 ...

> my $v=4.879834;

 ...

> printf( "%3.4f", $v);    # prints '  4.8798' without return
> printf( "%3.4f\n", $v);    # prints '  4.8798' with return

That's not what you get if you run the program.  The field-width 
specification (3) determines the minimal total width of the output 
field, not the number of characters ahead of the decimal indicator, as 
you seem to think.  As you have already forced at least six characters 
to be printed, the '3' specification is immaterial; no leading spaces 
are printed.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 02 May 2000 14:29:47 -0700
From: Aaron <alager@csuchico.edu>
Subject: printing to a jetdirect device from perl -- help
Message-Id: <390F48CB.7281B56A@csuchico.edu>

Can someone give me an example of how to print to a jetdirect device?
All I have is an IP address, not a network path per say.
I can make a device work with a network path eg.
//server_name/printer_name
but if all I have is an IP it doesn't seem to work the same.  Any and
all help on how to make this work is appreciated.

Aaron


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

Date: Tue, 02 May 2000 18:35:48 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Problem with $ sign in string
Message-Id: <7ar9bkre9o.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>


otrcomm@wildapache.net writes:

> On Mon, 01 May 2000 18:26:53 -0700, "Godzilla!"
> <godzilla@stomp.stomp.tokyo> wrote:
> 
> >You are declaring '$20' as a variable,
> >silly boy! Oh, this does bring back 
> >memories of so long ago...
> 
> I realize that perl thinks that this is a variable, but that is a
> limitation of perl.  The string exists in this format, so I have to
> figure out how to deal with it as is.

What do you exactly think is the Perl's limitation there? Perl offers
double-quoted and single-quoted strings. They are different for a good
reason. It's better to learn the difference between them, than to
criticize Perl.

Perl has no limitation there. You don't seem to understand what's
happening.

> Well, first of all, it is not my routines that write to the database.  It
> is a shopping cart system called minivend.
> 
> All I am trying to do is develop an interface between the existing shopping
> cart system and Cybercash.  I would prefer that the shopping cart system
> not write to the database in this format, but it does so I have to work
> with what it does.

So, you are reading from a file than contains dollar signs. Nothing
tricky with that:

	open F, $file or die $!;
	
	while (<F>) {
		if (/\$(\S+)/) {
			print $1;
			# ....
		}
	}

I suspect your problem is that after you read the lines from the file,
you somehow subject them to duoble-quoting:

	while (<F>) {
		my $line = "$_";
		# ...
	}

or something similar to that, which causes the $20 in your string to
get interpolated into the empty string. Of course, '-w' would have
warned you about it.

> I could modify the way that my copy of the shopping cart system writes to
> the database, but then no one else could use the tool that I am developing.
> 
> So, I still need to know how to pick the the part after the $ sign in the
> string.
> 
> Does anyone know how to do this?

You don't seem to understand how Perl works. I suggest you take your
time and read "Learning Perl" thoroughly, and all should be clear from
there. Also, get in the habit of using the '-w' switch which would
have warned you of an undefined value when your $20 was
interpolated. I will also suggest using the 'strict' pragma as it
helps you catch most of your bugs very early.

--Ala



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

Date: Tue, 02 May 2000 18:45:07 GMT
From: Bob Cunningham <sparky@alt-usage-english.org>
Subject: Re: Puzzled - Please help.
Message-Id: <bxkPOU63SPYfXpikIncMExzwOW8Z@4ax.com>

On Mon, 1 May 2000 22:13:43 -0400, tadmc@metronet.com (Tad McClellan)
said:

>On Tue, 02 May 2000 02:30:25 GMT, Bob Cunningham <sparky@alt-usage-english.org> wrote:

>>I've recently installed Perl 5.6 -- I think.

>Hope the docs got installed too  :-)

They did, but your reply has led me to learn a lot about them that I
needed to know.  I run under Windows 98, so a lot of the stuff I find
in books is not as helpful as it might be if it weren't heavily Unix
oriented.  I had no idea that the POD directory existed, for example,
but after reading your remarks I did a search of my Perl subdirectory
and found it.  (Other innocents may be interested to learn -- as I was
-- that 'POD' stands for 'Plain Old Documentation'.)

For online documentation I've mostly used the Perl Manual at
<http://www.ug.cs.dal.ca/pub/pub_dir/html/perl/perl.html>, and I've
found especially helpful the Master Index at
<http://www.ug.cs.dal.ca/pub/pub_dir/html/perl/pl-index.html>.

>   cd /somewhere/pod/   # look for "pod/" subdir under @INC dirs

>   grep '5\.006' *.pod

Your references to 'grep' as a command-line command and '@INC' are
typical of the sort of things I find in books.  I think they are
meaningful only to UNIX people, although I know there is a Perl
function called 'grep'.  My knowledge of UNIX is near zero.

>perldelta.pod (note the very end):

But I was able to extrapolate from your remarks to the Windows
environment and eventually found perldelta.pod.

>The English module now sets $PERL_VERSION to $^V (a string value) rather
>than C<$]> (a numeric value).  

So, now I understand about '5.006' being used to refer to version 5.6,
but I have a new puzzlement:  When I enter -- running under debug --
the Perl command 'print $^V' (or 'print "$^V"'), I get a two-character
response consisting of the symbols for 'club' and 'spade'.  

>(This is a potential incompatibility.
>Send us a report via perlbug if you are affected by this.)

Maybe they mean me.  But I don't know what they mean by
'incompatibility'.  What things are they saying may be incompatible?
Windows and UNIX implementations maybe?

I'm also puzzled, though, by the fact that when I look in the Master
Index for '$^V', I don't find it, although I do find similar
constructs like '$^T' and '$^W'.  Is the Perl Manual I find on the Web
not up-to-date, or is there some other reason that I can't find '$^V'
there?

I really do appreciate and thank you for the help you've given me.



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

Date: Tue, 02 May 2000 20:31:59 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Puzzled - Please help.
Message-Id: <7aln1sr8w2.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>


Bob Cunningham <sparky@alt-usage-english.org> writes:

> On Mon, 1 May 2000 22:13:43 -0400, tadmc@metronet.com (Tad McClellan)
> said:
> 
> >   grep '5\.006' *.pod
> 
> Your references to 'grep' as a command-line command and '@INC' are
> typical of the sort of things I find in books.  I think they are
> meaningful only to UNIX people, although I know there is a Perl
> function called 'grep'.  My knowledge of UNIX is near zero.

You can download a free Perl implementation of the most common unix
utilities, the Perl Power Toools (tm):

	http://language.perl.com/ppt/

 ....

> I'm also puzzled, though, by the fact that when I look in the Master
> Index for '$^V', I don't find it, although I do find similar
> constructs like '$^T' and '$^W'.  Is the Perl Manual I find on the Web
> not up-to-date, or is there some other reason that I can't find '$^V'
> there?

AFAIK, $^V was only introduced in Perl 5.6. Prior versions of Perl
didn't include it, so any older documentation will not mention it. Go
to your command propmt, and type 'perldoc perlvar'. Check there for
$^V.

--Ala



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

Date: Tue, 2 May 2000 15:32:00 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Puzzled - Please help.
Message-Id: <slrn8gub9g.5oq.tadmc@magna.metronet.com>

On Tue, 02 May 2000 18:45:07 GMT, Bob Cunningham <sparky@alt-usage-english.org> wrote:
>On Mon, 1 May 2000 22:13:43 -0400, tadmc@metronet.com (Tad McClellan)
>said:
>
>>On Tue, 02 May 2000 02:30:25 GMT, Bob Cunningham <sparky@alt-usage-english.org> wrote:
>
>>>I've recently installed Perl 5.6 -- I think.
>
>>Hope the docs got installed too  :-)
>
>They did, but your reply has led me to learn a lot about them that I
>needed to know. 


I love it when a plan comes together  :-)


>>   grep '5\.006' *.pod
>
>Your references to 'grep' as a command-line command 


You can (I think) get a 'grep' that runs anywhere that perl runs:

   http://language.perl.com/ppt/


Or, write grep in perl (UNTESTED ON WINDOWS):

   perl -ne "print qq/$ARGV: $_/ if /5\.006/" *.pod


>and '@INC' are
>typical of the sort of things I find in books.  I think they are
>meaningful only to UNIX people


@INC is Perl, not Unix (perlvar.pod).


and non-Unix people should

   s/grep/do a word search/g;

whenever they hear Unix people say "grep"  :-)


I cannot help with Windows-specific Perl question because 
I do not use Perl on that platform.


>I'm also puzzled, though, by the fact that when I look in the Master
>Index 


I do not know what "Master Index" means...


>for '$^V', I don't find it, although I do find similar
>constructs like '$^T' and '$^W'.  


It should be documented in 'perlvar.pod'.


>Is the Perl Manual I find on the Web
>not up-to-date, 


Yes, it is often out-of-date.

That is why you should use the docs that come with your
perl distribution instead of the web docs.


>I really do appreciate and thank you for the help you've given me.


You're welcome.

People like you, who _want_ to learn, are the reason I've
persisted here for so long, despite the downward trend
of the S/N ratio that signaled the start of Virtual September.

If you spend 10 minutes grep^H^H^H^Hword searching the
standard docs and still can't find help with your Perl
question, please post the question here.

Good luck!


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 02 May 2000 18:06:28 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: RE Question
Message-Id: <x7r9bkyggs.fsf@home.sysarch.com>

>>>>> "G" == Godzilla!  <godzilla@stomp.stomp.tokyo> writes:

  G> Michael Weir wrote:
 
  >> "Some text with comma, bad bad",33,44,55
 
  >> by commas, but not by commas followed by a space.

  G> Being an imaginative, if not schizoid programmer, my 
  G> personal method would be to do this in a way quite 
  G> different than a typical techno-geekster approach.

being that purlmoron is schizoid and an unimaginative programmer she has
posted her usual crap about parsing. she loves the broken idea of
special characters and it will bite you in the ass if you follow her
advice.

  G> Replace comma/space with a special character.
  G> Perform a split.
  G> Replace the comma/space.

wrong, wrong and wrong again.

  G> This is a fairly straight forth approach
  G> with no need for a lot of fancy coding.

this is fancy coding?

	split( /,(?! )/, $line ) ;

too complex for you, eh purlmoron? try learning some actual perl regex
stuff for a change.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Tue, 02 May 2000 11:13:50 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: RE Question
Message-Id: <390F1ADE.BD5CA290@vpservices.com>

Michael Weir wrote:
> 
> I want to parse lines like this:
> 
> "Some text with comma, bad bad",33,44,55
> 
> by commas, but not by commas followed by a space.
> 
> Is there a way to do this?

That kind of a line is in the format called CSV (Comma Separated
Values).  I seriously doubt that you really mean that you want to
distinguish commas followed by a space, it is more likely that you mean
commas that are embedded in quotes. What happens with a line like

     "Some text with comma,bad bad",35,44,55

And if your data source is something like Excel or Access or something
else that produces CSV, then you also need to watch out for quotation
marks that are embedded in quotation marks and possibly newlines that
are embedded in quotation marks.  Those situations can be handled with a
complex regex (see perlfaq4) or, if you don't want to reinvent the wheel
with the Text::ParseWords module.  If your ultimate goal is to separate
the lines into fields and either search or sort them, you are probaly
better off using a database module that is built to handle CSV records
such as DBD::CSV or DBD::RAM.

Godzilla's inane advice to change a comma followed by a space to some
special character works for the exact thing you specified, but does not
handle any real CSV records and also fails miserably if you do not have
control over what kinds of input your strings are derived from and that
input contains whatever special character you pick.  Even if your data
isn't CSV and you know 100% that the input won't contain the special
character and the only thing you need to watch out for is the
comma-space combo, then Godzilla's advice still stinks -- just do your
split on /, / and skip the special character conversion entirely.

-- 
Jeff


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

Date: Tue, 02 May 2000 20:19:31 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: References and hashes
Message-Id: <sgue2jph1g266@corp.supernews.com>

rbbdsb (rbbdsb@earthlink.net) wrote:
:   I'm trying to read in a file with three fields, create an array of the
: distinct values in the first field, and hashes named the first field
: containing the second and third fields.  An example would be:
: 
: name1    field1a    field2a
: name1    field1b    field2b
: name2    field1a    field2a
: name2    field1b    field2b
: name2    filed1c    field2c
: ...
: 
: I want an array containing
:     name1, name2, ...
: and hashes
:     $name1{fiield2a} = field1a;
:     $name1{field2b} = field1b;
:     $name2{filled2a} = field1a;

Using symbolic refs (or equivalently, autogenerated variables) is almost
always a bad idea.  Why not a hash using the first col as a key, and a
hash ref as the value?

Here's a demo program that shows how easy it is to do it that way:

#!/usr/bin/perl -w
# hdemo - demo showing how to build hashes and arrays from input data.
# Craig Berry (20000502)

use strict;

my %rec;

while (<DATA>) {
  chomp;
  my ($name, $val, $key) = split;
  $rec{$name}{$key} = $val;
}

my @names = sort keys %rec;

print "Names: @names\n",
      '$rec{name2}{field2a} = ', $rec{name2}{field2a}, "\n";

__DATA__
name1    field1a    field2a
name1    field1b    field2b   
name2    field1a    field2a
name2    field1b    field2b
name2    filed1c    field2c


Output:
/usr2/people/cberry > hdemo
Names: name1 name2
$rec{name2}{field2a} = field1a

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "The road of Excess leads to the Palace
      of Wisdom" - William Blake


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

Date: Tue, 2 May 2000 14:40:55 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: reg expressions assistance
Message-Id: <390f2f24$0$1862@wodc7nh1.news.uu.net>

Hello,
I am trying to get an understanding of efficiency within a regular
expression. I have some strings that come back from an application which
always seem to have a \n in the front and a \n in the back. So I have been
removing the front and rear newline, or space like this:

$fish =~ s/^\s*|\s*$//g;

But is that efficient and correct, or is it better to do it in two lines
$fish =~ s/^\s*//g;
$fish =~ s/\s*$//g;

Thanks
Scott




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

Date: Tue, 2 May 2000 13:01:00 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: reg expressions assistance
Message-Id: <8enc55$k8g$1@brokaw.wa.com>


spurcell <skpurcell@hotmail.com> wrote in message
news:390f2f24$0$1862@wodc7nh1.news.uu.net...
> Hello,
> I am trying to get an understanding of efficiency within a regular
> expression. I have some strings that come back from an application which
> always seem to have a \n in the front and a \n in the back. So I have been
> removing the front and rear newline, or space like this:
>
> $fish =~ s/^\s*|\s*$//g;

That doesn't strip leading and trailing blank spaces.

>
> But is that efficient and correct, or is it better to do it in two lines
> $fish =~ s/^\s*//g;
> $fish =~ s/\s*$//g;

The 'g's are superfluous.  (When are you going to have more than one
'beginning' or 'end' of a string?)

Check out the FAQ.

perlfaq4: How do I strip blank space from the beginning/end of a string?

It even answers your efficiency question.

Lauren




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

Date: Tue, 02 May 2000 20:24:34 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: reg expressions assistance
Message-Id: <7aog6or98e.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>


"spurcell" <skpurcell@hotmail.com> writes:

> Hello,
> I am trying to get an understanding of efficiency within a regular
> expression. I have some strings that come back from an application which
> always seem to have a \n in the front and a \n in the back. So I have been
> removing the front and rear newline, or space like this:
> 
> $fish =~ s/^\s*|\s*$//g;
> 
> But is that efficient and correct, or is it better to do it in two lines
> $fish =~ s/^\s*//g;
> $fish =~ s/\s*$//g;

Some time last year, somebody benchmarked the above two approaches,
and the results were posted in this newsgroup. IIRC, the second
approach, with the two lines is faster than the one line version. You
can do a search on the archives for more info.

--Ala


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

Date: Tue, 02 May 2000 21:19:34 GMT
From: Daniel Pfeiffer <occitan@esperanto.org>
Subject: Regexp speed (was: Help: bol regexp in split string)
Message-Id: <8engok$vm2$1@nnrp1.deja.com>

In article <390df2c3.2854891@news.skynet.be>,
  bart.lateur@skynet.be (Bart Lateur) wrote:

>> ...

> You're using the deprecated variables $` and $'. You do realize that
> these will slow every (other) regex down, because of this one
> function? Otherwise, an almost identical functionality can be gotten
> by doing:

> 	my @match;
> 	(my $pre, @match[0..3], $post) = split
> 	    ^\# .* \n? |
> 	    !< ([\s\S]*?) >! |
>  	    !\{ ([\s\S]*?) \}! | !(\})! |
> 	    ^! (.*) \n?
> 	  /mx, $_, 2;

> It stores $1, $2, $3, $4 into @match[0..3], irrespective of which
> parentheses actually actively captured anything. It doesn't combine
> them yet, though.

Well, I ran these two proggies with no other load on the machine through
shell command "time" ten times, and

$a='abcd';
while($i++<1000000){
    $a = "$'$1$`" if $a =~ /(c)/;
    $a =~ /b/;
}

got an average user time of 24.49s, and

$a='abcd';
while($i++<1000000){
    my @a;
    $a = "$a[2]$a[1]$a[0]" if @a = split /(c)/, $a, 2;
    $a =~ /b/;
}

got an average user time of 40.92 -- way worse! (The 2nd re is just in
case optimisations happen if calling the same one repeatedly.)

Btw. when not grouping (i.e. /c/, and in the first case replacing $1
with $&) I got 24.46s vs. 24.14s, a 1% advantage in the second case,
which then is of course no longer equivalent.  (Times taken with 5.005
on a 266Mhz Intel Linux 2.2.14 box.)

So much for generalisations! :-)  $' might slow things down, but split
/(...)/ seems to be a killer.  Of course this dramatic result might
shift with an increasing number of regexps in the program, but I don't
use too many.

I found the same thing concerning

	/\A\s*($joiner\s*)?(.*?)\s*($joiner\s*)?\Z/s;

When replacing this with two s/// as suggested in the FAQ, it became
about 1% slower!

--
Bring text-docs to life!              Erwecke Textdokumente zum Leben!
                   http://beam.to/iPerl/
Vivigu tekstodokumentojn!


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


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

Date: Tue, 2 May 2000 18:59:25 GMT
From: noSpam@hotmail.com (Mike)
Subject: Saving Uploaded Files using CGI.pm
Message-Id: <390f24bc.2264739843@news.boeing.com>

I have looked at a couple of examples using CGI.pm to upload files.
Each of these examples do things like echo back the contents, etc.

But none show how to actually save the file in a specific location.

I want users to be able to upload:
1) A file
2) Title of the file
3) Description of the file

The Title and description will be used to build a link, in an HTML
document that links to the file.  How does one actually save the file
that is uploaded, to a specific location?  The examples only use the
contents of a file that is saved in a temporary location.

BTW, the email does not work so post here.

Thanks,


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

Date: Tue, 02 May 2000 17:09:46 -0400
From: Stephen Dodd <dodd@ll.mit.edu>
Subject: Re: Specifying timeout with sockets
Message-Id: <390F441A.35845473@ll.mit.edu>


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



Francis Litterio wrote:

> Stephen Dodd <dodd@ll.mit.edu> writes:
>
> > When connecting to a terminal server using a socket object, I set the
> > timeout value to 10. The documention doesn't state the units of time but
> > I presume it's in seconds.
>
> From reading /usr/lib/perl5/5.00503/i386-linux/IO/Socket.pm on my Linux
> machine, I can confirm that the timeout value is in units of seconds.
>
> > The documents further states that the timeout is used for "some" operations.
>
> Where "some" means IO::Socket::connect() and IO::Socket::accept().  In
> fact, here's how IO::Socket::connect() implements the timeout using
> Perl's builtin "alarm" function -- I've elided unrelated code with
> "#..."for clarity:
>
>     sub connect {
>
>         my $fh = shift;
>
>         my $timeout = ${*$fh}{'io_socket_timeout'};
>         local($SIG{ALRM}) = $timeout ? sub { undef $fh; }
>                                      : $SIG{ALRM} || 'DEFAULT';
>
>          eval {
>
>             if($timeout) {
>                 defined $Config{d_alarm} && defined alarm($timeout) or
>                     $timeout = 0;
>             }
>
>             my $ok = connect($fh, $addr);
>
>             alarm(0)
>                 if($timeout);
>
>             croak "connect: timeout"
>                 unless defined $fh;
>
>             undef $fh unless $ok;
>         };
>
>         $fh;
>     }
>
> You could do the same around any method call your code makes.
> --
> Francis Litterio
> franl-removethis@world.std.omit-this.com
> PGP public keys available on keyservers.

 Stephen Dodd's Reply

> Francis,
>     I believe this will not work, since I can make a connection to the
> socket just fine.
>                             ______________                              ____________
> PC <->   ethernet <------>| Terminal Server | <---> serial connection | Serial Device |
>
>     Its when the Serial Device is not connected.
>
> If timeout is only used in establishing a ethernet connection not in reading
> or write it will not detect the error.
>
>    if I used  "while(<$socket>)" it hangs on the response, since it reads in only
> ASCII characters and newline, tab, etc. However when using "recv" on the socket
> connection I get continuous stream of non ASCII characters if the serial device is
> not connected.
>    I suppose I could the count garbage characters and if it exceeds a X number of bad characters consider the connection unreliable or the device is not operational or
> not connected.
>
>
>



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

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<p>Francis Litterio wrote:
<blockquote TYPE=CITE>Stephen Dodd &lt;dodd@ll.mit.edu> writes:
<p>> When connecting to a terminal server using a socket object, I set
the
<br>> timeout value to 10. The documention doesn't state the units of time
but
<br>> I presume it's in seconds.
<p>From reading /usr/lib/perl5/5.00503/i386-linux/IO/Socket.pm on my Linux
<br>machine, I can confirm that the timeout value is in units of seconds.
<p>> The documents further states that the timeout is used for "some" operations.
<p>Where "some" means IO::Socket::connect() and IO::Socket::accept().&nbsp;
In
<br>fact, here's how IO::Socket::connect() implements the timeout using
<br>Perl's builtin "alarm" function -- I've elided unrelated code with
<br>"#..."for clarity:
<p>&nbsp;&nbsp;&nbsp; sub connect {
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $fh = shift;
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $timeout = ${*$fh}{'io_socket_timeout'};
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local($SIG{ALRM}) = $timeout
? sub { undef $fh; }
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
: $SIG{ALRM} || 'DEFAULT';
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval {
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($timeout)
{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
defined $Config{d_alarm} &amp;&amp; defined alarm($timeout) or
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$timeout = 0;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my
$ok = connect($fh, $addr);
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alarm(0)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if($timeout);
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; croak
"connect: timeout"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
unless defined $fh;
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; undef
$fh unless $ok;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fh;
<br>&nbsp;&nbsp;&nbsp; }
<p>You could do the same around any method call your code makes.
<br>--
<br>Francis Litterio
<br>franl-removethis@world.std.omit-this.com
<br>PGP public keys available on keyservers.</blockquote>

<blockquote TYPE=CITE>
<pre></pre>
</blockquote>
&nbsp;Stephen Dodd's Reply
<blockquote TYPE=CITE>
<pre>Francis,
&nbsp;&nbsp;&nbsp; I believe this will not work, since I can make a connection to the&nbsp;
socket just fine.&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ______________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ____________
PC &lt;->&nbsp;&nbsp; ethernet &lt;------>| <u>Terminal Server</u> | &lt;---> serial connection | <u>Serial Device </u>|&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Its when the Serial Device is not connected.

If timeout is only used in establishing a ethernet connection not in reading
or write it will not detect the error.

&nbsp;&nbsp; if I used&nbsp; "while(&lt;$socket>)" it hangs on the response, since it reads in only&nbsp;
ASCII characters and newline, tab, etc. However when using "recv" on the socket
connection I get continuous stream of non ASCII characters if the serial device is
not connected.
&nbsp;&nbsp; I suppose I could the count garbage characters and if it exceeds a X number of bad characters consider the connection unreliable or the device is not operational or
not connected.&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</pre>
</blockquote>

<br>&nbsp;</html>

--------------8E6A3465B96645A31BEB0691--



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

Date: Tue, 02 May 2000 19:45:15 GMT
From: "Marcus" <mouimet@direct.ca>
Subject: Stuck with my script!
Message-Id: <ffGP4.196698$Dv1.2476752@news1.rdc1.bc.home.com>

    I am have been working on a script for some time and got it working but
now my cgi-bin has been move and I can't figure it out... it is probably
something really stupid that I am overlooking. I had the script in
/home/mysite/www/cgi-bin the file I needed to access was in
/home/mysite/www/hello. It switched the script being in /home/httpd/cgi-bin
and the file I need to acces in /home/httpd/html/hello Any suggestions would
be great it is probably something simple I am overlooking.

$servicesfolder = "../hello"; (I tried "../html/hello" and
"/home/httpd/html/hello")

 #info file

open(INFOFILE,">$servicesfolder/$in{service}/$in{username}/$infofilename");
  foreach $x (0 .. $#infofieldlist) {
   print INFOFILE
"<$infofieldlist[$x]>$in{$infofieldlist[$x]}</$infofieldlist[$x]>\n";
  }
  print INFOFILE "<password>$in{password}</password>\n";
  print INFOFILE "<dir>$in{service}</dir>\n";
  close(INFOFILE);
  $in{body}.="Info file: $servicesfolder/$infofilename saved.<br><br>\n";




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

Date: Tue, 2 May 2000 13:29:09 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: VMS Perl system() truncating lines
Message-Id: <MPG.1378da6cb826393898a9cc@nntp.hpl.hp.com>

In article <CPzP4.20189$0o4.175662@iad-read.news.verio.net> on Tue, 02 
May 2000 12:26:10 GMT, T.E.Dickey <dickey@shell.clark.net> says...
> In comp.os.vms Larry Rosler <lr@hpl.hp.com> wrote:
> > In article <8ekqd3$ver$1@nnrp1.deja.com> on Mon, 01 May 2000 20:45:28 
> > GMT, ewilts@my-deja.com <ewilts@my-deja.com> says...
> >> One of my developers is reporting that the Perl system() call is
> >> truncating the argument to 256 characters.  I'm running Perl 5.005_03.
> >> 
> >> Is this a known limitation?  Can this limit to be expanded to 1K or
> >> more?
> 
> > The limitation is not in Perl.  It might well be in the command 
> > processor that the system() call is invoking.  One way to avoid the 
> > limit would be to supply a list of arguments to system(), instead of a 
> > long string that requires parsing by the command processor.
> 
> but isn't the command-line limit still 1k?
> (256 sounds like reading/writing a mailbox rather than the command line).

That line-length limit would be OS-dependent.  However, the 
documentation that I referred to makes it clear that for a LIST 
argument, no shell is invoked, hence no 'command-line limit', whatever 
it may be.

perldoc -f exec

   If there is more than one argument in LIST, or if LIST is an array
   with more than one value, calls execvp(3) with the arguments in LIST.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 02 May 2000 13:07:42 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: What debugger do people use for Perl?
Message-Id: <390F196E.A8B2D60@texas.net>

jkroger wrote:
> 
> Hi, I'm learning Perl, and would like to know what people use for a
> debugger. I tried typing "perldoc debug" and "perldoc debugger" and got
> nothing.

You're close.

perldoc perldebug

And in the future, take a look at perltoc.

- Tom


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

Date: Tue, 2 May 2000 13:24:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: What debugger do people use for Perl?
Message-Id: <slrn8gu3qo.58j.tadmc@magna.metronet.com>

On Tue, 02 May 2000 13:50:38 -0400, jkroger <jkrogerSPAMBLOCKER@earthlink.net> wrote:
>Hi, I'm learning Perl, and would like to know what people use for a
>debugger. I tried typing "perldoc debug" and "perldoc debugger" and got
>nothing.


   perldoc perldebug


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 2 May 2000 11:20:40 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: What debugger do people use for Perl?
Message-Id: <8en68u$hso$1@brokaw.wa.com>


jkroger <jkrogerSPAMBLOCKER@earthlink.net> wrote in message
news:jkrogerSPAMBLOCKER-0205001350380001@tritone.csbmb.princeton.edu...
> Hi, I'm learning Perl, and would like to know what people use for a
> debugger. I tried typing "perldoc debug" and "perldoc debugger" and got
> nothing.

You were so close!

perldoc -q debug

Lauren




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

Date: Tue, 2 May 2000 15:13:38 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: Where are the FAQ's
Message-Id: <390f36cf$0$1860@wodc7nh1.news.uu.net>

Hello,
I am new to Perl, and have been told to do the following:

Check out the FAQ.
perlfaq4: How do I strip blank space from the beginning/end of a string?

I am running ActiveState Perl, and would like to know how I can get these
documents, and how the FAQs are organized for my future knowledge.

Thanks
Scott





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

Date: Tue, 02 May 2000 13:26:47 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Where are the FAQ's
Message-Id: <390F3A07.F25B920A@vpservices.com>

spurcell wrote:
> 
> Hello,
> I am new to Perl, and have been told to do the following:
> 
> Check out the FAQ.
> perlfaq4: How do I strip blank space from the beginning/end of a string?
> 
> I am running ActiveState Perl, and would like to know how I can get these
> documents, and how the FAQs are organized for my future knowledge.

From the command line:  "perldoc perldoc" for general info or, e.g.
"perldoc perlfaq4" for a specific faq.

From windows:  start-menu,
                 programs,
                   activePerl,
                       online-Documentation

A more general comment, is that when you download/install a package,
look in the "readme" or "release notes" files that are usually in the
package itself and/or on the site you got if from.  For example, the
information I just gave you is available at 

	http://www.activestate.com/ActivePerl/docs/RELEASE.html

-- 
Jeff


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

Date: Tue, 2 May 2000 13:30:00 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Where are the FAQ's
Message-Id: <8endrg$no5$1@brokaw.wa.com>


spurcell <skpurcell@hotmail.com> wrote in message
news:390f36cf$0$1860@wodc7nh1.news.uu.net...
> Hello,
> I am new to Perl, and have been told to do the following:
>
> Check out the FAQ.
> perlfaq4: How do I strip blank space from the beginning/end of a string?
>
> I am running ActiveState Perl, and would like to know how I can get these
> documents, and how the FAQs are organized for my future knowledge.

Hi Scott.  Search this newsgroup for an article by Tom Phoenix titled
"[Perl] How to find the Perl FAQ".  It will give you the info you need.

Lauren




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

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 2927
**************************************


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