[11065] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4665 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 15 23:03:54 1999

Date: Fri, 15 Jan 99 20:00:21 -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           Fri, 15 Jan 1999     Volume: 8 Number: 4665

Today's topics:
    Re: cat filename | wc -l   perl equivalent (Abigail)
    Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! ! <tgallo@metrolink.net>
    Re: Data Structure Notation <masonj@erols.com>
    Re: doscp command in program - proper email address <Russell_Schulz@locutus.ofB.ORG>
        Downloading HTML files? <mwatkins@promotion4free.com>
        File Upload <gsx97@yooo-esssss-aaaa.net>
    Re: File Upload <eugene@snailgem.org>
    Re: filter href-links from web-page ? (Matthew Bafford)
    Re: filter href-links from web-page ? (Abigail)
    Re: filter href-links from web-page ? bluepuma@mailexcite.com
    Re: Fork me! need children (Steve Leibel)
    Re: glob() returns empty (Abigail)
    Re: HTML Form --> PERL "print" ?? (help!) (Abigail)
    Re: Is perl the right choise for the following job? (Abigail)
    Re: more efficient error handling (Abigail)
    Re: New to Perl -- Frames Question (Tommy1452)
        Out of Memory (Tommy1452)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 16 Jan 1999 02:52:34 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: cat filename | wc -l   perl equivalent
Message-Id: <77outi$e0g$5@client2.news.psi.net>

Ala Qumsieh (aqumsieh@matrox.com) wrote on MCMLXIII September MCMXCIII in
<URL:news:x3yaezkqn4i.fsf@tigre.matrox.com>:
%% 
%% abigail@fnx.com (Abigail) writes:
%% 
%% > 
%% >         perl -wlpe '}$_=$.;{' filename
%% > 
%% 
%% excuse me? but that works!

Well, of course.

%% could some kind soul consider elaborating more on this please?

man perlrun




Abigail


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

Date: Fri, 15 Jan 1999 22:31:15 -0500
From: Tom <tgallo@metrolink.net>
Subject: Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
Message-Id: <36A00803.175CA5EE@metrolink.net>

That message hit one of the photo groups also
forget which one though
Tom

Peter Besenbruch wrote:

> On Mon, 11 Jan 1999 18:57:12 +0000, Dave Storey
> <dave@quik.demon.co.uk> wrote:
>
> >I figure he tail-gated AndersonRM ? Then the question becomes how ARM
> >got in ..
>
> The message got spammed to more appropriate groups like
> alt.christnet.bible, alt.christnet.philosophy, and
> alt.christnet.theology. It took a second person to put it there and
> ask if it was legit. I answered it there, as well.
>
> As for here, I wonder which planetarium program prints out a report
> like that?
> ___________________________________________________
>
> Hawaiian Astronomical Society http://www.hawastsoc.org
> HAS Deepsky Atlas http://www.hawastsoc.org/deepsky
> Delete the "nobulk." for the true e-mail address.



--
Tom Gallo     WW1survivor #6           e-mail<tgallo@metrolink.net>
49' Pan, 58'Pan, 86" Shovel
WildWood 99' page       <http://webpages.metrolink.net/~ksgallo/ww/ww.htm>

Web Pages               <http://webpages.metrolink.net/~ksgallo/>
Crochet stuff for alt.support.stop-smoking
                 <http://webpages.metrolink.net/~ksgallo/crochet.htm>




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

Date: Fri, 15 Jan 1999 22:45:36 -0500
From: "John Mason Jr" <masonj@erols.com>
Subject: Re: Data Structure Notation
Message-Id: <77p222$loo$1@winter.news.rcn.net>

you might want to check www.effectiveperl/pegs
for some ideas
John
Jerome O'Neil wrote in message <369CEB5A.12AE3954@atrieva.com>...
>I have been working with some data structures, mostly lists of hashes
>and hashes of hashes.  While commenting my code, I wanted to add some
>notes to explain what the various data structures represent, and I
>wasn't able to come up with a notation that was very satisfying.  For
>example, if I have a hash of lists, I notate it like this:
>
> %{date} => @(AtrievaTid,AtrievaTid,AtrievaTid,...)
>
>which seems adequate to me.  However, if I have a hash of hashes, with
>the inner hash values being anonymous subroutine references, the
>notation becomes a bit trickier.  Does anyone have a preferred method
>for describing data structures?
>
>Thanks!
>--
>Jerome O'Neil, Operations and Information Services
>Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
>jeromeo@atrieva.com - Voice:206/749-2947
>The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com




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

Date: Fri, 15 Jan 1999 21:38:27 -0500
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: doscp command in program - proper email address
Message-Id: <19990115.213827.8Y7.rnr.w164w@locutus.ofB.ORG>

Vommyt1@primenet.com (Randy Snott) writes:

> run "doscp filename a:"  in the shell. When I attempt to do
> the same from inside my program. I get 
> Usage: doscp [-r | -m] device:path  . . .  device:path  
> sh: a:: not found 

obviously, sh is trying to run `a:' as a program.

> I have tried using backticks, system(), exec() and even calling out
> the full name of the device,

that's your hint that you should have posted the example code, so people
could point out why that happened.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Sat, 16 Jan 1999 02:17:34 -0000
From: "Mike Watkins" <mwatkins@promotion4free.com>
Subject: Downloading HTML files?
Message-Id: <eVexOZPQ#GA.318@ntawwabp.compuserve.com>

Hi there,

I have a list of URL's in a text file, one per line.  I was wondering, how
could I have a script copy the source of each URL, to a text file?  I know
there is the LWP module, and socket(), but don't really know how to use
them.  All I need is the few lines of code to gather the source of the web
page, into an array.

Any help would be greatly appreciated,
Mike Watkins





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

Date: Fri, 15 Jan 1999 21:41:14 -0500
From: GSX <gsx97@yooo-esssss-aaaa.net>
Subject: File Upload
Message-Id: <369FFC49.4584A118@yooo-esssss-aaaa.net>

Does anyone know of a site that provides info on what is needed to write
a script for a CGI file upload via a browser?

I know that there are scripts written for this already and that CGI.pm
can also handle this, but I would like to learn to do it myself (a)
because I learn better by doing, not by using prewritten material, (b) I
will be able to better integrate the program into the site application,
and (c) it's nice to get that feeling of accomplishment!

I've been thumbing through my 6 Perl books gathering some info, but any
links to sites that may help would be greatly appreciated!

Thanks.


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

Date: Fri, 15 Jan 1999 22:11:06 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
To: GSX <gsx97@yooo-esssss-aaaa.net>
Subject: Re: File Upload
Message-Id: <36A0034A.E1536A0B@snailgem.org>

GSX wrote:
> 
> Does anyone know of a site that provides info on what is needed to write
> a script for a CGI file upload via a browser?
> 
> I know that there are scripts written for this already and that CGI.pm
> can also handle this, but I would like to learn to do it myself (a)
> because I learn better by doing, not by using prewritten material, (b) I
> will be able to better integrate the program into the site application,
> and (c) it's nice to get that feeling of accomplishment!
> 
> I've been thumbing through my 6 Perl books gathering some info, but any
> links to sites that may help would be greatly appreciated!
> 
> Thanks.

Well, you know Perl, you have CGI.pm and its documentation, I'd say dive
into the code. (Post again if it doesn't work for you)

-- 
Eugene

you: "I have a gun. Give me your money!"
Eliza: "Can you elaborate on that?"

	(from a conversation with the chatbot Eliza, as reported by John Nolan)


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

Date: Fri, 15 Jan 1999 21:47:31 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: filter href-links from web-page ?
Message-Id: <MPG.1109c7d15b17685c989789@news.scescape.net>

In article <77okpc$7q6$1@nnrp1.dejanews.com>, bluepuma@mailexcite.com 
pounded in the following:
=> Hi there,
=> 
=> could someone explain me how to filter href-links from a web-page ?

use HTML::Parser;

(Get it from http://www.cpan.org)

=> regards   Michael

HTH!

--Matthew


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

Date: 16 Jan 1999 03:04:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: filter href-links from web-page ?
Message-Id: <77ovj7$e0g$7@client2.news.psi.net>

bluepuma@mailexcite.com (bluepuma@mailexcite.com) wrote on MCMLXIII
September MCMXCIII in <URL:news:77okpc$7q6$1@nnrp1.dejanews.com>:
'' Hi there,
'' 
'' could someone explain me how to filter href-links from a web-page ?

HTML::Parser

'' I know how to check if there is a href-link, but how do I assign
'' a variable to the link ? And how do I adjust the path correctly ?
'' 
'' example:
'' in
''  /home/WorldCup/content/english/competition/draw_videos.htm
'' we got the line
''  <a href="../../images/footix.mov" target>
'' 
'' so how do I get to $link="/home/WorldCup/content/images/footix.mo"; ???

URI::URL

'' And what if there is more than 1 link in 1 line ?

Well, what about them?

''                                                   Can I just get an
'' array of links from the html-file ?

Uhm, yes, I suppose....



Abigail


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

Date: Sat, 16 Jan 1999 03:41:31 GMT
From: bluepuma@mailexcite.com
Subject: Re: filter href-links from web-page ?
Message-Id: <77p1pa$iad$1@nnrp1.dejanews.com>

Hi folks,

> could someone explain me how to filter href-links from a web-page ?

$line =~ s/.*<a href="(\S*?)(#\S*?)?">.*/$1/i

okay, I got this far, but how do I omit the blank ones if it's just a
href="#whatever" ? How can I deal with more than 1 occurence in a line ?

Is it possible to treat the file as a whole using something like //gis ?
Right now I have to match every single line.

open (FILEHANDLE, $file) or die "Error reading file $file: $!";
@array = <FILEHANDLE>;
close(FILEHANDLE);
foreach $line (@array)
{  if ($line =~ s/.*<a href="(\S*?)(#\S*?)?">.*/$1/i)  {  }  }


> in
>  /home/WorldCup/content/english/competition/draw_videos.htm
> we got the line
>  <a href="../../images/footix.mov" target>

> so how do I get to $link="/home/WorldCup/content/images/footix.mo"; ???

Any hints on how the get the right path (getting rid of the ..) ?

Thanx in advance   Michael

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 15 Jan 1999 19:09:59 -0800
From: stevel@coastside.net (Steve Leibel)
Subject: Re: Fork me! need children
Message-Id: <stevel-1501991910000001@192.168.100.2>

In article <369F3C90.F41D33AD@link-maker.com>, webmaster@link-maker.com wrote:

>    hehe, I'd like a good reference to learn more about forking in perl...
> I'm sure some one knows an excellent site or faq..or..book?
> Too many sequential proceses goin on in one place...
> 
> thanks

Well forking is forking, so I'd suggest a book such as Advanced Unix
Programming by Rochkind. 

Steve L
stevel@coastside.net


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

Date: 16 Jan 1999 02:42:39 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: glob() returns empty
Message-Id: <77ouav$e0g$1@client2.news.psi.net>

joshchou@my-dejanews.com (joshchou@my-dejanews.com) wrote on MCMLXIII
September MCMXCIII in <URL:news:77oebh$23m$1@nnrp1.dejanews.com>:
@@ below are portions of my code,
@@ 
@@ $browsedir = $q->path_translated();
@@ @files = glob("$browsedir\\webview\\*");
@@ 
@@ i'm trying to write a cgi which will take the portion of the url
@@ after the script, as a directory reference; and then list the
@@ files in that directory.

Why reinvent the wheel? Servers have been doing that for eons.


(What is your question anyway?)


Abigail


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

Date: 16 Jan 1999 02:45:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: HTML Form --> PERL "print" ?? (help!)
Message-Id: <77oug7$e0g$2@client2.news.psi.net>

Danny (dstern@aschwebhosting.comnospam) wrote on MCMLXIII September
MCMXCIII in <URL:news:77o0uk$jee$1@winter.news.rcn.net>:
{} I have a HTML form which accesses a PERL script to verify a credit card.  I
{} want to output the credit card information (which was typed in the HTML
{} form) in the new page that the PERL script creates.  I've tried
{}     print $FORM{'cardnumber');
{} But, it doesn't seem to work correctly.


What does it do, and what do you expect it to do?



Abigail


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

Date: 16 Jan 1999 02:46:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Is perl the right choise for the following job?
Message-Id: <77ouid$e0g$3@client2.news.psi.net>

Joeri Belis (progressdll@angelfire.com) wrote on MCMLXII September
MCMXCIII in <URL:news:77nv75$ejs$1@nickel.uunet.be>:
"" Is perl the right choise for the following job?
"" 
"" I want to connect to a certain site (asp pages)
"" and need the extract some info from that page.
"" reformat it and right it to an ascii file.
"" 
"" Can perl do that easy?


Yes.


Abigail


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

Date: 16 Jan 1999 02:48:57 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: more efficient error handling
Message-Id: <77oump$e0g$4@client2.news.psi.net>

Christian M. Aranda (christian.arandaNOSPAM@NOSPAMiiginc.com) wrote on
MCMLXIII September MCMXCIII in <URL:news:77o4dm$blt$1@news-1.news.gte.net>:
__ 
__ I've been trying to find a more efficient way to handle errors in my
__ script, but have come up short.  Here is what I have thus far:
__ 
__ $conn = &VanOpenConnection($vantive_id, $vantive_pw, $vantive_host,
__ $vantive_port);
__ 
__ &err_msg("fatal", "Unable to connect to $vantive_host",
__ "VanOpenConnection", $conn) if ($conn < 0);
__ 
__ &VanOpenConnection returns a negative number if it doesn't execute
__ properly.  I don't, however, need to save the number it returns.  I
__ thought of using || die much in the same way you would with opening
__ files, but I don't believe that evaluates properly.


Of course you can use ||. You must have done it wrong. But since you
don't give your code, we can't say what exactly is wrong.



Abigail


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

Date: 16 Jan 1999 02:43:19 GMT
From: tommy1452@aol.com (Tommy1452)
Subject: Re: New to Perl -- Frames Question
Message-Id: <19990115214319.03988.00001431@ng99.aol.com>

My EXACT QUESTION! 

If you get an anser to this post, could you be 
gracious enough to forward it to me?

Tom




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

Date: 16 Jan 1999 02:46:01 GMT
From: tommy1452@aol.com (Tommy1452)
Subject: Out of Memory
Message-Id: <19990115214601.03988.00001432@ng99.aol.com>

 I'm running perl from my home computer under MS-DOS.  After requesting  about
12 or so web documents using get  and parsing through them, the program shuts
down with an Out of Memory message.  I have 2 gigs left on my HD and 32megs of
RAM, I don't think memory should be a problem.  I'm storing only 3 web pages at
a time as strings in my program, and writing two words to a file for every get
request performed.   What can I do to fix this?


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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