[7221] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 845 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 11 15:17:19 1997

Date: Mon, 11 Aug 97 12:00:33 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 11 Aug 1997     Volume: 8 Number: 845

Today's topics:
     Re: 2 variables = 1 (sorta) <ptrainor@aura.title14.com>
     A Convoluted array.... (Carl Forsythe)
     Re: A Convoluted array.... <rootbeer@teleport.com>
     Re: adressing arrays <nnyxcu@ny.ubs.com>
     Re: Best way to connect to PostgreSQL 6.1.1 <jay@rgrs.com>
     changes between unix and NT <qeren@dotshop.com>
     Re: changes between unix and NT (Jeremy D. Zawodny)
     Comparing Files <Kevin_Skelton@mgic.com>
     Re: Comparing Files <rootbeer@teleport.com>
     Converting perl pod documentation to html <kperrier@Starbase.NeoSoft.COM>
     Re: Help with 'if'. (Honza Pazdziora)
     HELP! system() and the MS IIS <witz@uni-muenster.de>
     Re: HELP! system() and the MS IIS (Jeremy D. Zawodny)
     Help: Dead Piped Processes <w4vu@unb.ca>
     Re: Help: Dead Piped Processes <rootbeer@teleport.com>
     Re: How do I get started with win95? (Matthew Burnham)
     how to configure search script? Help !! <webmaster@nema.net>
     Re: how to configure search script? Help !! (Jeremy D. Zawodny)
     Re: how to configure search script? Help !! <rootbeer@teleport.com>
     How to treat "\n" as "\n" ? (Thomas Bahls)
     Re: How to treat "\n" as "\n" ? (Bill Napier)
     Re: How to treat "\n" as "\n" ? (Jeremy D. Zawodny)
     Re: Linux Installation perl5.004_01/02 (Honza Pazdziora)
     Re: Need documentation on (TOP) formats <nnyxcu@ny.ubs.com>
     Re: Parsing help (Jeremy D. Zawodny)
     Re: Parsing help (Jeremy D. Zawodny)
     Re: Perl and IRC (Matthew Burnham)
     perl cgi: displaying array of gifs <jlawrenc@acc.jc.edu>
     Re: perl with a dash of gif? (David Bonner)
     Perl-32 under Windows 95: System command (Matthew Mccaffrey)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 11 Aug 1997 13:50:59 -0400
From: Pat Trainor <ptrainor@aura.title14.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: 2 variables = 1 (sorta)
Message-Id: <Pine.LNX.3.95.970811133930.6122B-100000@aura>

On Mon, 11 Aug 1997, Tom Phoenix wrote:

> If your news administrator still carries comp.lang.perl, please let him
> or her know that that newsgroup has not existed since 1995. If you

	I'll let them know. News posts here can be a problem.

> > $abcd0001
> > $abcd0002
> 
> > 	How can I represent this variable as it changes, with another? 
> 
> I don't see what you mean by that. Do you want two variables to be
> synchronized to have the same values, so that changing $abcd0001 will
> change $abcd0002? 
> 
> >         print "key $key has a value of $urlb$count \n";
> >         }                              ^^^^^^^^^^^

	The first 1/2 will not change (urlb), but the last 1/2 will. I can
take care of the right half incrementing by 1 no sweat, the trick is how to
create a variable whose last 4 digits are incremented with the use of
another variable. If it were possible, I'd like to see:

	$variable = "urlb0001";
	$variable = $variable + 1;

	But this can't be so, right? It's a character string, as I see it.
Kind of like adding 1 to frog. So... I can work around this by having a
variable which I know the first part (string) and I increment the last part
(integer). How can the 2 be concanated into a string that can be parsed
into a variable?

	Like:

> > 	Where $urlb would always be: abcd and $count would increment by
> > 1 on each pass. 
> 
> Are you looking for $count++ to increment $count? Or are you trying to do
> something like $abcd[$count++] , an array element access? Or do you want a
> soft reference?

	Incrementing $count is a breeze, how do I attach it to the end of
another variable and call a new variable that is the combination of both
names? i.e.:

	$a = "abcd";
	$b = "1234";
	$c = "$($a$b)"; <- this code is not right at all! But what is?

where:

	I want the variable $c to be the variable $abcd1234 , not the
numeric representation-rather constructing the name of a new variable from
the names of 2 existing variables.

> I don't see how any of this could sort anything. But maybe you want Perl's
> built-in sort function. Hope this helps!

	I'm sure I'm not explaining myself well, if there were a faster,
easier way around my project, I'd use it. I posted here for ideas and
nobody replied, so I'm going about it the only way I can think of.

	Thanks for the reply!

pat 	
:)  	

System Administrator Guy
ptrainor@aura.title14.com
http://www.title14.com/resume

"While it's true winning isn't everything-LOSING IS NOTHING!" -Ed Bighead



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

Date: Mon, 11 Aug 1997 16:58:38 GMT
From: cforsythe@berksys.com (Carl Forsythe)
Subject: A Convoluted array....
Message-Id: <33ef434c.2123537@news.berksys.com>

I am working on a very application specific web log analyzer. Sounds
easy enough eh? Well, let me take it one step further...

I want to be able to follow a click-trail through the site based on
the cookie.

i.e. Cookie #1 grabbed pageA,pageB and pageC then disappeared.

What I am having trouble with is how to efficiently and easily do
this....

I am exploring using a hash with the cookie as the key and an array of
pages as the value.
 
The stumbling block that I am running into (at least mentally) is how
to actually go about this. Is it possible to create arrays dynamically
at runtime without even knowing their name? Or is there an easier
method of doing this?

Any sample code would be greatly appreciated....

-Carl



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

Date: Mon, 11 Aug 1997 11:10:10 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Carl Forsythe <cforsythe@berksys.com>
Subject: Re: A Convoluted array....
Message-Id: <Pine.GSO.3.96.970811110458.22944F-100000@julie.teleport.com>

On Mon, 11 Aug 1997, Carl Forsythe wrote:

> Is it possible to create arrays dynamically
> at runtime without even knowing their name? 

Yesss.... But you don't want to do that if you can help it.

> Or is there an easier method of doing this? 

Yes, usually a hash of references.

    $trail{$cookie} = [ 'index.html', 'hotdog.html' ];

The manpages, especially perlref, perllol, and perldsc, should be very
useful. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 11 Aug 1997 14:16:47 -0400
From: Glen Culbertson <nnyxcu@ny.ubs.com>
Subject: Re: adressing arrays
Message-Id: <33EF570F.196C@ny.ubs.com>

This is impossible to answer without some code with which to work.

We know that $xxx[13] and $xxx[$i] are the same value, if $i == 13. Your
problem must lie elsewhere.

Have you tried using the debugger?

denis@mathi.uni-heidelberg.de wrote:
> 
> hallo,
> 
> i tried to adress the elementes of adresse.
> adressing them with $xxx[13] for example works, but if i use a variable
> it doesnot work any more...
> does anyone knom the answer?
> 
> bye
> 
>         denis


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

Date: 11 Aug 1997 12:50:43 -0400
From: Jay Rogers <jay@rgrs.com>
Subject: Re: Best way to connect to PostgreSQL 6.1.1
Message-Id: <82sowg7jfg.fsf@shell2.shore.net>

Andrzej =?US-ASCII?Q?Bagi=F1ski?= <abagi@coral.idk.com.pl> writes:
> What is the best way to work with PostgreSQL database using Perl?

Check out this web site:

    http://www.PostgreSQL.org/features.shtml

--
Jay Rogers
jay@rgrs.com


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

Date: Mon, 11 Aug 1997 13:06:09 -0400
From: Carine Boneh <qeren@dotshop.com>
Subject: changes between unix and NT
Message-Id: <33EF4681.92554A19@dotshop.com>

<HTML>
Hi,
<BR>I have to make changes in a perl program written for unix platforms
in order
<BR>to make it work under Windows NT.
<BR>I am looking for a site were it is explained wich sentences to replace
with
<BR>wich ones, or just what will not work under NT.
<BR>I've looked in the faq of Evangelo and I couldn't find what I really
wanted.
<BR>If somebody could tell me such a site exists and were I could find
it...
<BR>Thank you
<BR>Qeren</HTML>



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

Date: Mon, 11 Aug 1997 18:44:48 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: changes between unix and NT
Message-Id: <33ef5cb0.273607957@igate.hst.moc.com>

[cc'd to original author]

On Mon, 11 Aug 1997 13:06:09 -0400, Carine Boneh <qeren@dotshop.com>
wrote:

><HTML>
>Hi,
><BR>I have to make changes in a perl program written for unix platforms
>in order
><BR>to make it work under Windows NT.
><BR>I am looking for a site were it is explained wich sentences to replace
>with
><BR>wich ones, or just what will not work under NT.
><BR>I've looked in the faq of Evangelo and I couldn't find what I really
>wanted.
><BR>If somebody could tell me such a site exists and were I could find
>it...
><BR>Thank you
><BR>Qeren</HTML>

Oh, let's see. First, PLEASE TURN OFF HTML in your news client. At
least I'm using one of the more tolerant newsreaders, but most folks
aren't.

In any case, I don't know of a comprehensive site that will tell you
step-by-step how to port Perl scripts from Unix to NT.

Some basic rules of thumb:

- Path references will all change.
- fork() isn't implemented.
- System commands system("/bin/ls") or `/bin/ls` style will break
because they make assumptions about which platform(s) they are on.
- Stuff that depends on kernel-type things (resources limits and so
on) will break.

It's not hard to write code that will move from one platform to the
other without re-coding, if people would just make better use of the
modules that are available.

In any case, run it under perl -cw and see if any obvious problems
creep up. Then run the script and see where it bombs. Most problems
will be fairly obvious, as Perl should give you a line number.

Good Luck,

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Mon, 11 Aug 1997 13:09:03 -0700
From: Kevin Skelton <Kevin_Skelton@mgic.com>
Subject: Comparing Files
Message-Id: <33EF715F.6862@mgic.com>

Does anyone know of a module or routine that would help in trying to
compare the contents of two files?  I need to write a routine to grab
the  key off one file and locate that key in a second file and then
compare the data found for each key.

Thanks,
Kevin


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

Date: Mon, 11 Aug 1997 11:47:18 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Kevin Skelton <Kevin_Skelton@mgic.com>
Subject: Re: Comparing Files
Message-Id: <Pine.GSO.3.96.970811114525.22944K-100000@julie.teleport.com>

On Mon, 11 Aug 1997, Kevin Skelton wrote:

> Does anyone know of a module or routine that would help in trying to
> compare the contents of two files?  I need to write a routine to grab
> the  key off one file and locate that key in a second file and then
> compare the data found for each key.

Are these DBM files, CSV files, or something else? There are plenty of
modules on CPAN which could help with what you want. If you don't find one
to your liking, you're welcome to submit your own. :-)  Hope this helps! 

    http://www.perl.com/CPAN/

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 11 Aug 1997 10:59:40 -0500
From: Kent Perrier <kperrier@Starbase.NeoSoft.COM>
Subject: Converting perl pod documentation to html
Message-Id: <csvi1cpv6b.fsf@Starbase.NeoSoft.COM>

I am attempting to use the pod2html script to convert all of my perl 
documentation to html.  I don't have a problem in converting the individual
files, but I want convert ALL of the documentation to html, with the
correct crossreferencing, including the dicumentation for all of the
extra modules that I have installed.

I have yet to have any luck doing this.  Has anyone else done this?
If so, is the script that you used on CPAN.  I tried Tom Christensen's 
script that was on CPAN and it didn't do the job.

Thanks in advance.

Kent
-- 
Kent Perrier                             kperrier@neosoft.com 
Corporations don't have opinions, people do.  These are mine.


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

Date: Mon, 11 Aug 1997 15:55:39 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Help with 'if'.
Message-Id: <adelton.871314939@aisa.fi.muni.cz>

Page <page@pageg.demon.co.uk> writes:

> Hi all,
> I am a complete Perl novice, and I am attempting to create a script to
> perform some simple operations on data from a www form amd then mail it
> to me. My problem is that I am trying to insert an "if" statement  into
> my script so that if fields are empty they are not displayed in the
> emails. The code I am trying to use is below:
> 
> > print "Email: $FORM{'Email'}\n";
> >
> > if ($FORM{'SubjectEnquiry'} eq "") {
> > goto A;
> > exit;
> > }
> > print "Specific Subject of Enquiry: $FORM{'SubjectEnquiry'}\n";
> > A
   ^^^
I think you have to include colone here: A: to make it a label. And
you might consider to rewrite the script to avoid the goto command
completely, like this:

	print "Specific Subject of Enquiry: $FORM{'SubjectEnquiry'}\n"
		unless $FORM{'SubjectEnquiry'} eq "";

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
    European RC5 56 bit cracking effort -> http://www.cyberian.org/


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

Date: Mon, 11 Aug 1997 19:57:42 +0200
From: "Andreas Wytzisk" <witz@uni-muenster.de>
Subject: HELP! system() and the MS IIS
Message-Id: <33EF5296.E0E3C2DA@proplant.de>

Hi,
I try to start a commandline executable within a CGI script using the
system() / Win32::Process::Create commands (both fails). Running the
script from the commandline everthing works fine. But when it's started
by a web request (MS Internet Information Server 2.0; NT4.0) nothing
happens. The IIS registry entry CreateProcessWithNewConsole is done.

Thanks in advance,
Andreas.

--

Andreas Wytzisk
Institut fuer Agrarinformatik
pro_Plant GmbH
Nevinghoff 40
D-48147 Muenster

Tel.  : +49 251 / 2376-592
Fax.  : +49 251 / 2376-551
Email : A.Wytzisk@proPlant.de
        witz@farmer.uni-muenster.de
http://www.proplant.de




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

Date: Mon, 11 Aug 1997 18:46:57 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: HELP! system() and the MS IIS
Message-Id: <33ef5dd3.273899005@igate.hst.moc.com>

[cc'd to original author]

On Mon, 11 Aug 1997 19:57:42 +0200, "Andreas Wytzisk"
<witz@uni-muenster.de> wrote:

>Hi,
>I try to start a commandline executable within a CGI script using the
>system() / Win32::Process::Create commands (both fails). Running the
>script from the commandline everthing works fine. But when it's started
>by a web request (MS Internet Information Server 2.0; NT4.0) nothing
>happens. The IIS registry entry CreateProcessWithNewConsole is done.

Have you isolated the problem to Perl?

Try running a simple .CMD or .BAT file through the web server first,
to make sure that it knows how to start command-line tools in the CGI
environment.

Also, consider upgrading to IIS3.0.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Mon, 11 Aug 1997 13:51:36 -0400
From: David Tweedie <w4vu@unb.ca>
Subject: Help: Dead Piped Processes
Message-Id: <33EF5128.6220@unb.ca>

Hi,

I have a Perl/Tk program which creates a number of pipes to other
process to read their output. These processes are continous, until
explicitly closed. My problem is that occationaly one of the piped
proceeses may fail, and this results in my main program freezing while
waiting for output form the dead pipe. 

I'm wondering how I would go about avoiding this. I think that I would
have to use the %SIG varaible, but I've been unsucccessful so far.

Any help would be greatly appreciated.

David


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

Date: Mon, 11 Aug 1997 11:43:28 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: David Tweedie <w4vu@unb.ca>
Subject: Re: Help: Dead Piped Processes
Message-Id: <Pine.GSO.3.96.970811113556.22944I-100000@julie.teleport.com>

[ Followups set to comp.lang.perl.misc, since this doesn't seem to be
Tk-specific. ]

On Mon, 11 Aug 1997, David Tweedie wrote:

> I have a Perl/Tk program which creates a number of pipes to other
> process to read their output. These processes are continous, until
> explicitly closed. My problem is that occationaly one of the piped
> proceeses may fail, and this results in my main program freezing while
> waiting for output form the dead pipe.

If I understand your situation, the other process isn't quitting, but your
process is blocking while waiting for data to come through the pipe. If
that's right, you probably want the four-argument form of select, along
with sysread. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 11 Aug 1997 18:25:23 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: How do I get started with win95?
Message-Id: <33f30ef3.6410882@news.enterprise.net>

"Richard Butcher" <mailus@web-uk.com> wrote:

>Is it possible to get into Perl without a degree in programming other
>languages? !
Yep.

>I've downloaded perl5 and read every faq I can find and monitored this
>newsgroup for a fortnight.
Where from? Which version?

>Remember too, in some
>benighted countries we still have to pay for the phone connection while
>we're on line.
Me too! :-(

>Has any kind soul provided a bit of software for win95 that sorts out the
>installation and gets perl working?
Sounds like you've got the source rather than the compiled version. Go
to http://www.activeware.com/ and get their latest perl port for Win32.

>Of course, in an ideal world, it would be perfect to have enough of what's
>needed for a server to make the things work for real: like I fill in a form
>on my web page, press the send button and it all happens (off line).
>
>But even being able to work stuff in a dos window would be a step forward.
That should be possible once you have perl setup.

>I ain't rich so don't bother pointing me to a $1000 package but I would be
>happy to pay shareware rates.
Nope, there's nothing available as shareware that I can think of - but
there is something available free! First get perl from ActiveWare
working then get OmniHTTPd from http://www.fas.harvard.edu/~glau/httpd/
and see if you can install that properly, then watch this group and
comp.infosystems.www.authoring.cgi to see if anyone else asks how to
install it, etc. or ask yourself.

Should I write a "how to install perl on Windows 95 (and how to run CGI
with that setup" faq, or is there already one somewhere?


-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Mon, 11 Aug 1997 12:35:39 -0700
From: Web Team <webmaster@nema.net>
Subject: how to configure search script? Help !!
Message-Id: <33EF698A.A32EDC1F@nema.net>

Hi  perl gurus,
 I am a newbie to Perl, I tried to  configure a perl script  for a
search engine  evrytime I try to execute it on thew browser it gives
>>Internal Server Error

>>The server encountered an internal error or misconfiguration and was
unable to >>complete your request.

Please contact the server administrator, webmaster@nema.net and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
the path is correct ( to the perl directory) version is correct I am
unable to  configure any help would be much  appreciated
thx in advance
Ananth
Ps
 the Url is
http://www.nema.net/cgi-bin/search.pl



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

Date: Mon, 11 Aug 1997 17:00:34 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: how to configure search script? Help !!
Message-Id: <33ef4452.267367083@igate.hst.moc.com>

[cc'd to original author]

On Mon, 11 Aug 1997 12:35:39 -0700, Web Team <webmaster@nema.net>
wrote:

>Hi  perl gurus,
> I am a newbie to Perl, I tried to  configure a perl script  for a
>search engine  evrytime I try to execute it on thew browser it gives
>>>Internal Server Error
>
>>>The server encountered an internal error or misconfiguration and was
>unable to >>complete your request.
>
>Please contact the server administrator, webmaster@nema.net and inform
>them of the time the error occurred, and anything you might have done
>that may have caused the error.
>the path is correct ( to the perl directory) version is correct I am
>unable to  configure any help would be much  appreciated

Woah...

It sounds like you need to back up a bit, 'cause you're already in
over your head. Please don't be offended by the title of the following
document, but I'd first suggest that you read "The Idiot's Guide to
Solving Perl/CGI Problems" at
<URL:http://www.perl.com/perl/faq/cgi/idiots-guide.html>.

Thanks,

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Mon, 11 Aug 1997 10:49:01 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Web Team <webmaster@nema.net>
Subject: Re: how to configure search script? Help !!
Message-Id: <Pine.GSO.3.96.970811104845.22944B-100000@julie.teleport.com>

On Mon, 11 Aug 1997, Web Team wrote:

>  I am a newbie to Perl, I tried to  configure a perl script  for a
> search engine  evrytime I try to execute it on thew browser it gives
> >>Internal Server Error

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to
solving such problems. It's available on the perl.com web pages. Hope
this helps!

   http://www.perl.com/perl/
   http://www.perl.com/perl/faq/
   http://www.perl.com/perl/faq/idiots-guide.html

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 11 Aug 1997 18:14:52 GMT
From: thommy@cs.tu-berlin.de (Thomas Bahls)
Subject: How to treat "\n" as "\n" ?
Message-Id: <5snkqs$lj3$1@news.cs.tu-berlin.de>

hello,

 I am looking for a function that does the opposite of quotemeta; I
want Perl to interprete <backslash> <n> (two chars) as carriage
return.

How can I do this?

	example:

		$a= 'This is the first line.\n"Nope!"';
		print $a

	results:
		This is the first line.\n"Nope!"


	but I want:
		This is the first line.
		Yes!
		

The task sounds soooo easy, but I have not found a way to do this
:-(

anybody?

 thanks in advance         ---
                            | hommy
-- 
Thomas Bahls - http://abwegen.cs.tu-berlin.de/~thommy/ (if NFS server is up ;)
*MDR abschalten! Jetzt!*


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

Date: 11 Aug 1997 18:36:15 GMT
From: napier@seas.upenn.edu (Bill Napier)
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <slrn5uumsv.dog.napier@blue.seas.upenn.edu>

On 11 Aug 1997 18:14:52 GMT, Thomas Bahls <thommy@cs.tu-berlin.de> wrote:
>hello,
>
> I am looking for a function that does the opposite of quotemeta; I
>want Perl to interprete <backslash> <n> (two chars) as carriage
>return.

Double quote (") do this.  The single quote (') you were using does
not interpret \n or anything else (variable names, etc).

		$a= "This is the first line.\n\"Yes!\"";
		print $a

Prints:
		This is the first line.
		Yes!
		
Bill Napier - CSE '98 | e-mail: napier@seas.upenn.edu
----------------------| WWW:    http://www.seas.upenn.edu/~napier
 This space for rent  | finger for more information (phone, PGP, etc.)
-----------------------------------------------------------------------


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

Date: Mon, 11 Aug 1997 18:49:02 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <33ef5e56.274030094@igate.hst.moc.com>

[cc'd to original author]

On 11 Aug 1997 18:14:52 GMT, thommy@cs.tu-berlin.de (Thomas Bahls)
wrote:

>How can I do this?
>
>	example:
>
>		$a= 'This is the first line.\n"Nope!"';
>		print $a
>
>	results:
>		This is the first line.\n"Nope!"
>
>
>	but I want:
>		This is the first line.
>		Yes!
>		

Don't use the single-quotes.

 $a= "This is the first line.\nNope!";

Read up on the differences (to Perl) between single and double quotes.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Mon, 11 Aug 1997 15:35:52 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Linux Installation perl5.004_01/02
Message-Id: <adelton.871313752@aisa.fi.muni.cz>

Volker Gierenz <volker@halifax.rwth-aachen.de> writes:

> Hello,
> 
> I tried to install the Perl 5.004_01/02 distribution on my Linux system
> (SUSE 5.0).
> 
> Howerver I get the following error-message:
> 
> >maus:/usr/incoming/perl5.004_02 # ./versiontest
> >
> >perl: warning: Setting locale failed.
> >perl: warning: Please check that your locale settings:
> >       LC_ALL = (unset),
> >        LC_CTYPE = "ISO-8859-1",
> >        LANG = (unset)
> >    are supported and installed on your system.
> >perl: warning: Falling back to the standard locale ("C").
> >
> >maus:/usr/incoming/perl5.004_02 #

You probably start the script while having the LC_CTYPE shell variable
set. If your Linux is not installed correctly and something of the
locale stuff is missing, it could make this noise. As a quick fix,
try to run

( unset LC_CTYPE ; ./versiontest )

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
    European RC5 56 bit cracking effort -> http://www.cyberian.org/


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

Date: Mon, 11 Aug 1997 14:10:09 -0400
From: Glen Culbertson <nnyxcu@ny.ubs.com>
To: m.trautwein@syllogic.nl
Subject: Re: Need documentation on (TOP) formats
Message-Id: <33EF5581.58BE@ny.ubs.com>

Marten,

  The Camel book (blue) really has the whole scoop. But, I've found the
documention on formats to be a bit on the non-intuitive side, a little
inconsistent, and the precise meaning of the terms doesn't leap out to
me. I've had to do a bit of experimenting.

  One assertion is that "Top-of-form processing is by default handled by
a format with the same name as the current filehandle with _TOP
concatenated to it." (page 123). This suggests that you could set the
default output filehandle, (with a 'select' command) and then its
top-of-page format would be used by other filehandles. But, no. In the
documentation for the write statement (page 242) it says "By default the
name of the top-of-page format is the name of the filehandle with '_TOP'
appended." Notice the absense of the word 'current' in the second
definition.

  What appears to actually happen is that the default top-of-form format
is whatever format is being used by the write statement, with _TOP
appended. In other words, if I say:

use FileHandle;
my $filehandle = new FileHandle;

$filehandle->format_name("HOWDIE");
  # BTW: is this what you mean by "initialize the format of a
filehandle" ?

write $filehandle;

  # for this write, the format is "HOWDIE". If there is a "HOWDIE_TOP",
  # it will get used as the top-of-page format. If there is not (as in
this 
  # case), there will be no top-of-page formatting. 
  #
  # So even though STDOUT is the current filehandle (nothing was
SELECTed to
  # change that) STDOUT_TOP is _not_ used as the top-of-page format.

  # to get the all-purpose heading, I think you have to set it for each 
  # filehandle:

$filehandle->format_top_name("STDOUT_TOP");
write $filehandle;  #not at top-of-page any more, but if it were....

format HOWDIE = 
    Howdie, Partner
 .

format STDOUT_TOP =
    All-Purpose Heading
 .



Marten Trautwein wrote:
> 
> Hi,
> 
> Can anyone recommend documentation on formats and top-of-page formats?
> Neither the purple nor the blue Camel book discusses the subject in
> (enough) detail. Alas, the FAQ http://www.perl.com/perl/faq/ also does
> not help.
> 
> I have the following problem (cf. comp.lang.perl.misc:66269). When I
> initialize the format of a filehandle, the top-of-page format is
> suddenly
> changed accordingly on the first write. The Camel books do not describe
> this kind of functionality.
> 
> Marten Trautwein,
> m.trautwein@syllogic.nl,
> 
> Syllogic B.V., Houten, The Netherlands


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

Date: Mon, 11 Aug 1997 16:56:07 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Parsing help
Message-Id: <33ef43f3.267272427@igate.hst.moc.com>

[cc'd to original author, yes... myself.]

On Mon, 11 Aug 1997 16:27:39 GMT, zawodny@hou.moc.com (Jeremy D.
Zawodny) wrote:

>[cc'd to original author]
>
>On 11 Aug 1997 14:28:30 GMT, lgw@cs.buffalo.edu (The Whopper) wrote:
>
>>I need some major help.  I wrote a program a few months back that parses
>>the sys$log.err file on Netware 3.12.  It searches for a particular string,
>>then mails a message to certain people.  Recently I've encountered some
>>problems where the program does not get past certain points in the log
>>file.  I am wondering, is there a limit to the size of a file perl can read
>>in?  If necessary, I can send any help-givers the code and the log file so
>>they can examine it.  Immediate help would be much appreciated.
>
>Larry,
>
>The Perl has to pre-built limitations as far as how much data it can
>read/process. You are more likely to run into a problem with system
>resources (like running out of virtual memory) before Perl dies on
>you.
>
>Perhaps your pattern matching code isn't quite right...
>
>Feel free to post a *small* code segment and logfile sample, and
>someone will be sure to take a stab or two and fixing it.

I hate it when I'm interrupted while posting a message. Gr.

What I meant to say is that Perl has no pre-built limitations...

Yikes.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Mon, 11 Aug 1997 16:27:39 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Parsing help
Message-Id: <33ef3a9e.264883322@igate.hst.moc.com>

[cc'd to original author]

On 11 Aug 1997 14:28:30 GMT, lgw@cs.buffalo.edu (The Whopper) wrote:

>I need some major help.  I wrote a program a few months back that parses
>the sys$log.err file on Netware 3.12.  It searches for a particular string,
>then mails a message to certain people.  Recently I've encountered some
>problems where the program does not get past certain points in the log
>file.  I am wondering, is there a limit to the size of a file perl can read
>in?  If necessary, I can send any help-givers the code and the log file so
>they can examine it.  Immediate help would be much appreciated.

Larry,

The Perl has to pre-built limitations as far as how much data it can
read/process. You are more likely to run into a problem with system
resources (like running out of virtual memory) before Perl dies on
you.

Perhaps your pattern matching code isn't quite right...

Feel free to post a *small* code segment and logfile sample, and
someone will be sure to take a stab or two and fixing it.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com


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

Date: Mon, 11 Aug 1997 18:24:46 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Perl and IRC
Message-Id: <33f20e67.6270306@news.enterprise.net>

Sergio Stateri Jr <serginho@mail.serve.com> wrote:

>Hi ! Does Perl under Win32 work with Net::IRC ? Where do I find this
>module ?
Very well, being as that's how I'm developing it - the problem is
getting it work on any other platforms!

Its not releasable yet, but if you (or anyone else) would like a copy to
help develop it further feel free to mail me. I could really do with
someone to help me with socket portability and possibly someone to check
that I'm doing it in a reasonable way (anybody who'd like to try it can
probably do that) - I'm using references to subroutines to allow custom
handlers for PINGs and PONGs, etc. - that was the only way I could think
to implement callbacks (but there must be another way!)



-- 
Matthew Burnham         | danew@enterprise.net
Manager, MindWeb        | http://www.mindweb.co.uk/
Web design and hosting  | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!


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

Date: Mon, 11 Aug 1997 11:44:46 -0500
From: "Jack Lawrence" <jlawrenc@acc.jc.edu>
Subject: perl cgi: displaying array of gifs
Message-Id: <5snfim$7l1@thor.cmp.ilstu.edu>

 Hey there,

I'm working on a program in which one cgi script displays a table of slide
descriptions and an <a href> to the user.  The user clicks on one of the
links to select a slide.  From there, another cgi script is passed both the
slide number that was selected and an array of all the slide numbers in that
table.  The selected slide (gif file) is displayed with a 'view next slide'
and a 'view previous slide' button at the bottom.  Is there a way that the
user can jump back and forth among the array of slides without having to
recall the cgi file each time?  The slide results can get quite large as
there are about 5000 slides to search from, so it would be nice to only have
to load the array once.  I hope this makes some sense!  Thanks for your
help.

Jack Lawrence







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

Date: 11 Aug 1997 13:43:49 GMT
From: davidb@news.kenan.com (David Bonner)
Subject: Re: perl with a dash of gif?
Message-Id: <5sn4ul$e4c@pony.kenan.com>

Matthew Knight (matt@geenite.demon.co.uk) wrote:
: hi

: can anyone direct me to a script, or the whereabouts of a tutorial or 
: help to create GIF images through a perl script?
: for example, when data is entered through a form, a gif file (say a 
: graph or chart) is created.

I've just posted Chart::* v. 0.92, an alpha release of a general-purpose 
graphing module using Lincoln Stein's GD.pm for graphics primitives.  It 
allows easy generation of line, bar, point, point-and-line, pie, and, for
you QA folks, pareto graphs.  Keep in mind that it's still an alpha, and I
don't have a lot of the bells and whistles (read: customization is limited
at this point) yet, but it's a work in progress, and it will be getting
better.

--
#==========================================================================#
#"it's the word's suppression that gives it the power, | david bonner      #
# the violence, the viciousness"   - lenny bruce       | dbonner@cs.bu.edu #
#==========================================================================#


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

Date: 11 Aug 1997 14:21:52 -0400
From: mmccaff@eden.rutgers.edu (Matthew Mccaffrey)
Subject: Perl-32 under Windows 95: System command
Message-Id: <5snl80$eec@er4.rutgers.edu>

The company I work for has a product which currently runs under UNIX and
Windows NT. The program consists of perl scripts which make system calls
to dos-based executables, written in C. We're trying to port a version over
to Windows 95.

We're using Perl-Win32, and it doesn't seem to be handing system calls very
nicely. The result codes that it gets from system calls seem to be screwy,
and it also launches and closed new windows for each execution.

If anyone has every dealt with this or similar problems, I'm VERY interested
in what you know. 

Please email me if possible at

mmccaff@unipress.com

Thanks,
Matt McCaffrey




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

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

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