[17574] in Perl-Users-Digest
Perl-Users Digest, Issue: 4994 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 30 06:05:37 2000
Date: Thu, 30 Nov 2000 03:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <975582312-v9-i4994@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 30 Nov 2000 Volume: 9 Number: 4994
Today's topics:
Re: activate <secursrver@hotmail.com>
Re: activate nobull@mail.com
Re: adduser <Per-fredrik.Pollnow@epk.ericsson.se>
Re: adduser <josef.moellers@fujitsu-siemens.com>
Re: adduser <Per-fredrik.Pollnow@epk.ericsson.se>
Re: calling perl script in html? <johngros@Spam.bigpond.net.au>
Re: calling perl script in html? <secursrver@hotmail.com>
Re: calling perl script in html? <brian+usenet@smithrenaud.com>
Re: Calling perl with input type hidden probs?????? <bart.lateur@skynet.be>
Comparing two directory hierachies? <henrik7205@hotmail.com>
FAQ 4.25: How can I access/change the first N letters <faq@denver.pm.org>
Re: Form reposting in older browser problem <bart.lateur@skynet.be>
Re: getting the local host name or ipaddress nobull@mail.com
good format for frequently-updated database? <eundersander@austin.rr.com>
Help needed: how to get information (path) where Perl s <oooo@ooooooo.com>
Re: Help needed: how to get information (path) where Pe <alian@alianwebserver.com>
Re: help with active perl dtbaker_dejanews@my-deja.com
Help with Net::NNTP please? <jjlupa@mw.mediaone.net>
Re: Help with stripping/extracting (Tad McClellan)
Re: how do i direct compiler errors to a file-newbie <roman.stawski@fr.adp.com>
Re: how do i direct compiler errors to a file-newbie <geoff-at-farmline-dot-com@127.0.0.1>
HOW TO CALL ORACLE-EXPORT FROM A PERL PROGRAM gerhard.hann@generali.at
Re: How to find what is between n'th and the next tab? <bart.lateur@skynet.be>
Re: how to print webpage into a *.html file? dtbaker_dejanews@my-deja.com
Re: how to print webpage into a *.html file? (Rafael Garcia-Suarez)
Re: how to print webpage into a *.html file? <secursrver@hotmail.com>
Re: how to print webpage into a *.html file? <secursrver@hotmail.com>
Re: how to print webpage into a *.html file? <brian+usenet@smithrenaud.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 30 Nov 2000 09:54:21 GMT
From: "Ed Grosvenor" <secursrver@hotmail.com>
Subject: Re: activate
Message-Id: <htpV5.18005$II2.1782208@newsread2.prod.itd.earthlink.net>
Your question isn't exactly clear. What do you mean by two new pieces of
Perl? Do you mean modules? Scripts that you have written? If Perl is
installed on that drive, then all you should have to do is specify the path
to Perl on the first line of your scripts (something like
!#usr/local/bin/perl). Then set the permissions on your script to 755
(that's chmod). If you're running on a Windows box, then don't worry about
the permissions. If your problem is something more complicated, like Perl
isn't installed on your server or you need to add modules, then we'll need
more information to help you.
Good luck!
<neurofase@my-deja.com> wrote in message news:904i3j$5r6$1@nnrp1.deja.com...
> I am a complete newbie to perl. I first used it about a year ago. I
> have never written a perl form until now, but i have modified several.
>
> The set up that I have is that the webserver is just another drive on
> the netwrork. Whenever I created these 2 new pieces of perl I just
> transfered them onto the drive, but the dont work.
>
> I think i remember something about having to execute perl before it
> will work and you can do this by a FTP or Telnet program. The firewall
> here does not allow me to FTP or Telnet.
>
> Do I have to execute or activate the perl sections to get them to work
> and if so how would i do this considering they are only on another
> drive and not transfered through FTP or Telnet????
>
> Thanks
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
------------------------------
Date: 30 Nov 2000 08:48:12 +0000
From: nobull@mail.com
Subject: Re: activate
Message-Id: <u9itp5ojk1.fsf@wcl-l.bham.ac.uk>
neurofase@my-deja.com writes:
> I think i remember something about having to execute perl before it
> will work and you can do this by a FTP or Telnet program.
I think what you are (mis-)remembering is "set the executable bit on
the script" which is something you do to scripts (in any language) on
Unix systems.
chmod +x script
This has nothing to do with Perl.
You may also have to perform some web server configuration so that it
knows that is allowed to executre scripts in the directory where
you've put them.
This has even less to do with Perl.
> Do I have to execute or activate the perl sections to get them to work
> and if so how would i do this considering they are only on another
> drive and not transfered through FTP or Telnet????
Well duh! If the files are on a drive local drive then then there's
no need to telnet or FTP to get to the machine where the files are -
just issue the chmod command locally.
Actually my PSI::ESP module tells me that perhaps the drive is being
exported from a Unix box to a Windows box using Samba/SMB - I can't
recall if there's a way to set the executable bit in this situation.
This has still less to do with Perl - except of course you could
modify one of the existing scripts (which might be written in Perl) to
set the executable bit on the new scripts.
I think you really should talk to your system admin and ask how (s)he
expects you to do it.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 30 Nov 2000 09:13:09 +0100
From: "Per- Fredrik Pollnow" <Per-fredrik.Pollnow@epk.ericsson.se>
Subject: Re: adduser
Message-Id: <9051n9$c1i$1@newstoo.ericsson.se>
Aaa sorry, FreeBSD. I have done the adduser thing..I find it on
www.perlguru.com <http://www.perlguru.com> .) The only thing I need help
with fore the moment is how to random a password :)
"kevin metcalf" <xzrgpnys@yvtugubhfrovm.pbz> wrote in message
news:3A255772.3D5507E3@yvtugubhfrovm.pbz...
> Per- Fredrik Pollnow wrote:
> > Hi,
> > I'm doing a litel program, I'm a newbie @ perl, so please help me.
> > Ok this is what the program is going to do:
> > First the user run the program and enter all the information I need,
thats
> > no problem..
> > The problem begins here: when I got all the information I whant to
crate an
> > account with his name and a random password.
> > The name I now erlier from the program, I don't whant the user to enter
the
> > password(the user gets an email with all the information and password
later
> > in the program).
>
> Well, for starters it would be good to know what OS you are using...
> Kevin
> --
> email: xzrgpnys@yvtugubhfrovm.pbz
> Huh? http://www.flactem.com/utils/rot13.html
------------------------------
Date: Thu, 30 Nov 2000 09:32:33 +0100
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: adduser
Message-Id: <3A2610A1.3CCBD7D2@fujitsu-siemens.com>
Per- Fredrik Pollnow wrote:
> =
> Aaa sorry, FreeBSD. I have done the adduser thing..I find it on
> www.perlguru.com <http://www.perlguru.com> .) The only thing I need hel=
p
> with fore the moment is how to random a password :)
How about using the rand function to generate random numbers and use
those to select random characters from a-zA-Z0-9 and assorted characters
=2E..
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
Date: Thu, 30 Nov 2000 10:27:46 +0100
From: "Per- Fredrik Pollnow" <Per-fredrik.Pollnow@epk.ericsson.se>
Subject: Re: adduser
Message-Id: <90560u$qh7$1@newstoo.ericsson.se>
Aha now I know how to do, thanx fore the help guy s :)
"Josef Moellers" <josef.moellers@fujitsu-siemens.com> wrote in message
news:3A2610A1.3CCBD7D2@fujitsu-siemens.com...
Per- Fredrik Pollnow wrote:
>
> Aaa sorry, FreeBSD. I have done the adduser thing..I find it on
> www.perlguru.com <http://www.perlguru.com> .) The only thing I need help
> with fore the moment is how to random a password :)
How about using the rand function to generate random numbers and use
those to select random characters from a-zA-Z0-9 and assorted characters
...
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
Date: Thu, 30 Nov 2000 09:51:21 GMT
From: "John Boy Walton" <johngros@Spam.bigpond.net.au>
Subject: Re: calling perl script in html?
Message-Id: <tqpV5.11919$GW5.76924@news-server.bigpond.net.au>
I assume you are calling after a click on a button just use the ahref tag
with the scripts address.
"joshbaxley" <joshb@isomedia.com> wrote in message
news:904bvd$143$1@nnrp1.deja.com...
> I have a perl script that simply takes a list of files in a directory
> and lists them in html with links to them.
>
> Now if I did this in ASP and not perl and I wanted to call it in an HTML
> page, I would simply type:
>
> <!-- #LOCATION File:page.asp -->
>
> now how do I do this with perl?
>
> cheers
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Thu, 30 Nov 2000 09:58:18 GMT
From: "Ed Grosvenor" <secursrver@hotmail.com>
Subject: Re: calling perl script in html?
Message-Id: <_wpV5.18013$II2.1782380@newsread2.prod.itd.earthlink.net>
You're on the right track. I'd use the <!--#Exec CGI server side include.
It's probably the easiest way. If you're concerned about security issues
dealing with server side includes, write a "wrapper" that parses out your
HTML document with the script inside of it. In other words, rather than
having a SSI from inside an HTML document, have a Perl script that prints
the HTML and the links list all in one shot.
Good luck!
joshbaxley <joshb@isomedia.com> wrote in message
news:904bvd$143$1@nnrp1.deja.com...
> I have a perl script that simply takes a list of files in a directory
> and lists them in html with links to them.
>
> Now if I did this in ASP and not perl and I wanted to call it in an HTML
> page, I would simply type:
>
> <!-- #LOCATION File:page.asp -->
>
> now how do I do this with perl?
>
> cheers
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Thu, 30 Nov 2000 05:36:10 -0500
From: brian d foy <brian+usenet@smithrenaud.com>
Subject: Re: calling perl script in html?
Message-Id: <brian+usenet-12D1E3.05361030112000@news.panix.com>
In article <_wpV5.18013$II2.1782380@newsread2.prod.itd.earthlink.net>,
"Ed Grosvenor" <secursrver@hotmail.com> wrote:
> You're on the right track. I'd use the <!--#Exec CGI server side include.
that would be
<!--#exec cgi="..." -->
although it's often better to use
<!--#include virtual="..." -->
--
brian d foy
Perl Mongers <URL:http://www.perl.org>
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 30 Nov 2000 09:37:10 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Calling perl with input type hidden probs??????
Message-Id: <gh7c2tsc2gdnjm9bpprt5jbevei864k5c6@4ax.com>
Gordon Handley wrote:
><FORM method="post" action
>="http://www.cs.cf.ac.uk/User-bin/G.Handley/houses.pl">
><input type="image" src="images/buttonnews.gif"
>alt="Houses News" border=0><input type ="hidden" name="action" value="News">
><input type="image" src="images/buttonpeople.gif"
>alt="People" border=0><input type ="hidden" name="action" value="People">
...
Wrong newsgroup. But, since we're both here: that won't do. ALL hidden
variables will be sent, so "action" will be sent 3 times.
Give you images a name, like
<input type="image" src="images/buttonnews.gif" alt="Houses News"
border=0 name="news">
and check for form value names like "news.x" and/or "news.y"
--
Bart.
------------------------------
Date: Thu, 30 Nov 2000 07:41:14 GMT
From: Henrik <henrik7205@hotmail.com>
To: henrik.jonsson@se.adtranz.com
Subject: Comparing two directory hierachies?
Message-Id: <9050aq$fre$1@nnrp1.deja.com>
Is there any module that can be used to compare two directory
hierarchies? Like the command dircmp on unix.
I have looked at CPAn but I didn't find anything.
Thanks!
/Henrik
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 30 Nov 2000 07:17:01 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ 4.25: How can I access/change the first N letters of a string?
Message-Id: <N9nV5.22$_g6.170610176@news.frii.net>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.
+
How can I access/change the first N letters of a string?
There are many ways. If you just want to grab a copy, use substr():
$first_byte = substr($a, 0, 1);
If you want to modify part of a string, the simplest way is often to use
substr() as an lvalue:
substr($a, 0, 3) = "Tom";
Although those with a pattern matching kind of thought process will
likely prefer:
$a =~ s/^.../Tom/;
-
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep comming up. If you are some how irritated by
seeing these postings you are free to ignore them or add the sender
to your killfile. If you find errors or other problems with these
postings please send corrections or comments to the posting email
address.
If you are not able to find this or other Perl documentation from
your installation you may access it via the web by following the
appropriate links from one of the addresses listed below.
http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search
http://www.perldoc.com
http://www.cpan.org
http://www.perl.com
Answers to questions about LOTS of other stuff, mostly not related to
Perl, can be found at
news:news.answers
and in the many thousands of other useful Usenet news groups.
The perlfaq manual pages contain the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-1999 Tom Christiansen and Nathan
Torkington. All rights reserved.
When included as an integrated part of the Standard
Distribution of Perl or of its documentation (printed or
otherwise), this work is covered under Perl's Artistic
License. For separate distributions of all or part of
this FAQ outside of that, see the perlfaq manpage.
Irrespective of its distribution, all code examples here
are public domain. You are permitted and encouraged to
use this code and any derivatives thereof in your own
programs for fun or for profit as you see fit. A simple
comment in the code giving credit to the FAQ would be
courteous but is not required.
--
This space intentionally left blank
------------------------------
Date: Thu, 30 Nov 2000 09:28:27 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Form reposting in older browser problem
Message-Id: <l77c2to5n383b76o5b3phclud9qc8v8488@4ax.com>
Mike Cameron wrote:
>I have everything pretty much complete
>and went to check the results in Netscape 3.04 and I am finding that
>everytime I post something via a form to the script it gets reloaded. ie
>gets posted twice.
It's not really Perl's problem. The problem is something like key
bounce: Netscape sees it's button pressed twice in a row, quickly. It
could well be wrong about it, but that doesn't make a difference for
you.
You'll have to find a way to detect this. You can create a hidden form
variable, which is unique to this particular instance of the form. Check
it when processing, and if you see the same value used twice in a row,
you should be alarmed.
Of course, if it doesn't matter for your script, i.e. for example it
doesn't add a value to a databse every time, then you shouldn't even
bother.
--
Bart.
------------------------------
Date: 30 Nov 2000 08:43:22 +0000
From: nobull@mail.com
Subject: Re: getting the local host name or ipaddress
Message-Id: <u9k89lokcb.fsf@wcl-l.bham.ac.uk>
gaddamsr@my-deja.com believes for some inexplicable reason that he is
exempt from the requirement to check the FAQ before he posts:
> How can i get real host name of localHost?.
See FAQ: "How do I find out my hostname/domainname/IP address?"
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 30 Nov 2000 10:25:50 GMT
From: "Eric Undersander" <eundersander@austin.rr.com>
Subject: good format for frequently-updated database?
Message-Id: <OWpV5.30781$S55.562899@typhoon.austin.rr.com>
For my music website, I have a list of about 200 artists/bands. Each artist
has a dedicated html page, and I want to keep track of various data to
display in each artist's page. Two examples are
- user-submitted links to artist-specific fanpages
- traffic to the page itself
I originally planned to store every artist's name, along with all their
data, in one "master" file. But then, to add (for example) a fanpage link
for an artist, I would have to:
- read the entire master file into an array/string/whatever
- search and find the specific artist
- insert the fanpage link
- probably reprint the artist's html page to reflect the update
- print the *entire* array/string back to file
Considering how often these updates will be done (100/day, perhaps more
often), I started thinking it would be better to have a master artist file
containing just names, and then have separate files for each artist
containing their data. This way I'd only have to update one little file (in
addition to the artist's html page). Now, I'm not worried about conserving
CPU overhead... I guess it just seems risky to be messing with the entire
database so often.
Any suggestions on how to do this?
------------------------------
Date: Wed, 29 Nov 2000 22:01:11 -0800
From: "DS" <oooo@ooooooo.com>
Subject: Help needed: how to get information (path) where Perl script is located?
Message-Id: <t2br3e7rkvopfb@corp.supernews.com>
I need that information during runtime. Running Perl under Win98. %ENV hash
does not contain the information needed. Any help is appreciated.
Please reply to: russianbook@netscape.net
DS
------------------------------
Date: Thu, 30 Nov 2000 10:02:13 +0100
From: "Alain BARBET" <alian@alianwebserver.com>
Subject: Re: Help needed: how to get information (path) where Perl script is located?
Message-Id: <9054t6$6kj$1@news2.isdnet.net>
Hi,
> I need that information during runtime. Running Perl under Win98. %ENV
hash
> does not contain the information needed. Any help is appreciated.
One method:
#!/usr/bin/perl
use CGI qw/:standard :html3 :netscape escape unescape/;
use CGI::Carp qw/fatalsToBrowser/;
print header,`pwd`;
Another, more clean (without system call).
#!/usr/bin/perl
use CGI qw/:standard :html3 :netscape escape unescape/;
use CGI::Carp qw/fatalsToBrowser/;
use Cwd;
print header,cwd;
HTH,
--
Alain BARBET
http://www.alianwebserver.com
------------------------------
Date: Thu, 30 Nov 2000 05:00:52 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: help with active perl
Message-Id: <904mu2$9bs$1@nnrp1.deja.com>
> > displaying the script output is just too much for our machines OS's.
> > When in doubt blame Bill! ;-)
-----------
most likely it is an apache config problem.... try using a simpler
webserver like the one from www.xitami.com
D
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 30 Nov 2000 07:02:34 GMT
From: Jonathan Lupa <jjlupa@mw.mediaone.net>
Subject: Help with Net::NNTP please?
Message-Id: <ootb2ts9i9vhtl720508d67ejr2g4p5bjq@4ax.com>
caveat: this project is my first code encounter with NNTP, and my
second with perl.
I need to find an efficient way of maintaining a list of message IDs
for VERY large newsgroups, so I try to pull all headers the first
time, and then only pull new ones from then on and merge them into my
header list. (duh)
The bottom line is whether there is any way to do this without
newnews() or while( $nntp->$next() ) {%mapofids{$_} = 1;}
My server doesn't like newnews(), returning "502 NEWNEWS Permission
Denied (command disabled)". And looping through $next's takes a long
time.
I figure there has to be a way to do it since agent can pick up new
articles and expire old articles very quickly, but I'm not sure what
to try.
Any help would be greatly appreciated!
-Jonathan
------------------------------
Date: Wed, 29 Nov 2000 23:03:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with stripping/extracting
Message-Id: <slrn92bkc3.56c.tadmc@magna.metronet.com>
Anth <anth@pnc.com.au> wrote:
>
>I have a html file from which I want to extract certain values,
You should really use a module that understands HTML for
processing HTML.
>and then
>put these values into a text file.
perldoc -f open
perldoc -f print
>The html is formatted in the following way:
>
><tr>
><td>Town</td>
><td>value1</td>
><td>value2</td>
><td>value3</td>
><td>value4</td>
><td>value5</td>
></tr>
>
>and so on for the rest of the file.
If you are really really sure that the data will always be
exactly as you have shown, then you can do a dirty
hack (as below) instead of Doing It Right (with an HTML
module).
>What I want to do is specify a list of town names that I want, and then
>extract values 3 and 4 relevant to that Town name, while discarding the
>html tags and anything else left over. I then want to export these
>values to a text file in the format
>
>Town1 - Value4 - Value3
>Town2 - Value4 - Value3
>
>and so on.
>Any help or advice would be appreciated :)
---------------------------
#!/usr/bin/perl -w
# This is a dirty hack program. I will laugh at you if you
# use this and it fails.
use strict;
my %towns; # key = town name, value = v4 and v3 with hyphen between
# build the cross-reference hash
{ local $/ = "\n</tr>\n";
while ( <DATA> ) {
chomp; # strip </tr> end tag line
s/.*?<tr>\n//s; # strip up to <tr> start tag line
next unless /^<td>/; # no table data in this "chunk"
s#</?td>##g; # strip all <td> start and end tags
my @rows = split /\n/;
# name v4 v3
$towns{$rows[0]} = "$rows[3] - $rows[2]";
}
}
# now look stuff up
foreach ( qw/Town2 Town3/ ) { # a list of towns to look up
print "$_ - $towns{$_}\n" if exists $towns{$_};
}
---------------------------
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 30 Nov 2000 09:25:24 +0100
From: Roman Stawski <roman.stawski@fr.adp.com>
Subject: Re: how do i direct compiler errors to a file-newbie
Message-Id: <3A260EF4.E7EA1AD0@fr.adp.com>
Bart Lateur wrote:
>
> The requirement is that this BEGIN block should be in front of your
> error. Perl compiles sequentially, and executes a BEGIN block as soon as
> it is compiled. Yes, that does mean, before the rest of the script is
> compiled.
>
> How else would you ever expect pragma's to work? (pragma = "module" that
> changes the behaviour of the compiler)
Yes, I use BEGIN blocks regularly for compile time initialisation, and
occasionally debugging. It's just the idea of using the mechanism to
redirect the compiler output never occurred to me.
--
Roman Stawski - ADPgsi
------------------------------
Date: Thu, 30 Nov 2000 10:13:59 -0000
From: "Geoff Winkless" <geoff-at-farmline-dot-com@127.0.0.1>
Subject: Re: how do i direct compiler errors to a file-newbie
Message-Id: <90598h$9tm$1@soap.pipex.net>
"Uri Guttman" <uri@sysarch.com> wrote in message
news:x73dgabpzj.fsf@home.sysarch.com...
: >>>>> "GW" == Geoff Winkless <geoff-at-farmline-dot-com@127.0.0.1> writes:
:
:
: GW> I'm happy to believe that it's a perfectly valid perl method. I'm
: GW> simply stating that I think it's sick to design a compiler which
: GW> runs code while it compiles, and actually to make use of it.
:
: you obviously don't know perl well. the whole point of use and BEGIN
: code *IS* that they are executed at compile time.
You're right, I'm still learning, and I didn't realise that BEGIN is purely
a compiler-time directive.
Thanks :)
Geoff
------------------------------
Date: Thu, 30 Nov 2000 10:43:36 GMT
From: gerhard.hann@generali.at
Subject: HOW TO CALL ORACLE-EXPORT FROM A PERL PROGRAM
Message-Id: <sbqV5.39$bW1.2879@nreader1.kpnqwest.net>
This is a multipart message in MIME format.
--=_alternative 003AEBF0412569A7_=
Content-Type: text/plain; charset="us-ascii"
I would like to call an Oracle-Export from a Program:
## Per-Program
..
..
Perl- Code
..
..
`set ORACLE_SID=TEST`
`exp expuser/expuser CONSISTENT=Y FULL=Y COMPRESS=Y INDEXES=Y GRANTS=Y
FILE=$EXP`
...
...
Perl - Code
my problem is, that I call a oracle-program with ` ` - I think a ` `
always open a new shell - and so the right ORACLE_SID is not set - can
you help me, how to do this right - is it the right way to call an
oracle-program with `` ?
operating system is windowsNT
thanks a lot
Gerhard Hann
--=_alternative 003AEBF0412569A7_=
Content-Type: text/html; charset="us-ascii"
<br><font size=1 face="sans-serif">I would like to call an Oracle-Export from a Program:</font>
<br>
<br><font size=1 face="sans-serif">## Per-Program</font>
<br><font size=1 face="sans-serif">...</font>
<br><font size=1 face="sans-serif">...</font>
<br><font size=1 face="sans-serif">Perl- Code</font>
<br><font size=1 face="sans-serif">...</font>
<br><font size=1 face="sans-serif">...</font>
<br><font size=1 face="sans-serif">`set ORACLE_SID=TEST`</font>
<br><font size=1 face="sans-serif">`</font><font size=2 face="Courier New">exp expuser/expuser CONSISTENT=Y FULL=Y COMPRESS=Y INDEXES=Y GRANTS=Y FILE=$EXP</font><font size=1 face="sans-serif">`</font>
<br><font size=1 face="sans-serif">....</font>
<br><font size=1 face="sans-serif">....</font>
<br><font size=1 face="sans-serif">Perl - Code</font>
<br>
<br>
<br><font size=1 face="sans-serif">my problem is, that I call a oracle-program with ` ` - I think a ` ` always open a new shell - and so the right ORACLE_SID is not set - can</font>
<br><font size=1 face="sans-serif">you help me, how to do this right - is it the right way to call an oracle-program with `` ?</font>
<br>
<br><font size=1 face="sans-serif">operating system is windowsNT</font>
<br>
<br><font size=1 face="sans-serif">thanks a lot</font>
<br><font size=1 face="sans-serif">Gerhard Hann</font>
<br>
--=_alternative 003AEBF0412569A7_=--
------------------------------
Date: Thu, 30 Nov 2000 10:32:04 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How to find what is between n'th and the next tab?
Message-Id: <o0bc2tcj3sbm0doctau994adnkmd7inf2c@4ax.com>
Anno Siegel wrote:
>>It needs to be compiled only once per column. So, if you want the 17th
>>column of each record, you get one closure for this column, and call it
>>for each line.
>
>True, in principle only one translation per case is necessary. But I
>have trouble imagining how the interpreter would keep track of cases
>that have been dealt with.
Oh. I was assuming that, for example, the "name" was the 17'th column,
and you want to extract the name for every record. That's not too
uncommon, I assume?
But anyway, what you propose isn't as hard to do in plain Perl. Just
make an array of closures. Even caching the closures is dead easy.
$field = ($sub[$col] ||= get_column($col))->($line);
--
Bart.
------------------------------
Date: Thu, 30 Nov 2000 05:49:13 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: how to print webpage into a *.html file?
Message-Id: <904poo$bdh$1@nnrp1.deja.com>
In article <3A253186.57F40533@sinaman.com>,
jin zengxiang <jingzx@sinaman.com> wrote:
> Hi,there:
> I can print out a html file smoothly by using CGI.pm ,but i wonder
how
> can I save the webpage created by CGI.pm into a standalone file such
as
> "myhtml.html". I mean I don't want to print the content in browser
,but
> to a html file .can anyone help?
---------------
well, you cant do it after youve already printed to the browser...
you'll need to redirect <STDOUT> or use select() or open a filehandle
and make your print statements send the text where you want it.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 30 Nov 2000 07:41:24 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: how to print webpage into a *.html file?
Message-Id: <slrn92c16j.dlc.rgarciasuarez@rafael.kazibao.net>
jin zengxiang wrote in comp.lang.perl.misc:
> Hi,there:
> I can print out a html file smoothly by using CGI.pm ,but i wonder how
> can I save the webpage created by CGI.pm into a standalone file such as
> "myhtml.html". I mean I don't want to print the content in browser ,but
> to a html file .can anyone help?
Open a file for writing and print to it :
open OUTPUT, ">foo.html" or die "Can't open foo.html: $!\n";
print OUTPUT "<html><head>\n";
# etc...
close OUTPUT;
perldoc -f open
perldoc -f print
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 30 Nov 2000 10:11:46 GMT
From: "Ed Grosvenor" <secursrver@hotmail.com>
Subject: Re: how to print webpage into a *.html file?
Message-Id: <CJpV5.18029$II2.1784175@newsread2.prod.itd.earthlink.net>
Of course, if you have to both save the HTML file and print it, here's what
you can do...
$htmlFile = "whatever.html";
open (OUT, "+>$htmlFile") || die "Failed to open $htmlFile ($!)";
#the previous line assumes you want to create a NEW file. To re-write an
existing file, use > instead of +>.
print OUT "<html>Blah blah blah</html>";
close OUT;
#now open the file you just wrote and display it...
open (OUT, "$htmlFile") || die "Failed to display $htmlFile ($!)";
while (<OUT>) {
$line = (<OUT>);
print $line;
}
close OUT;
That's about all there is to that.
jin zengxiang <jingzx@sinaman.com> wrote in message
news:3A253186.57F40533@sinaman.com...
> Hi,there:
> I can print out a html file smoothly by using CGI.pm ,but i wonder how
> can I save the webpage created by CGI.pm into a standalone file such as
> "myhtml.html". I mean I don't want to print the content in browser ,but
> to a html file .can anyone help?
>
> Thanks .
>
> Alan
>
------------------------------
Date: Thu, 30 Nov 2000 10:13:24 GMT
From: "Ed Grosvenor" <secursrver@hotmail.com>
Subject: Re: how to print webpage into a *.html file?
Message-Id: <8LpV5.18032$II2.1784520@newsread2.prod.itd.earthlink.net>
One more quick thing. I'm sure you know this, but for those newbies who
learn from reading posts and responses, don't forget that when you print an
HTML file to STDOUT (the monitor), you need to first print the content type:
print "Content-type: text/html\n\n"; At least two newline characters are
needed at the end.
jin zengxiang <jingzx@sinaman.com> wrote in message
news:3A253186.57F40533@sinaman.com...
> Hi,there:
> I can print out a html file smoothly by using CGI.pm ,but i wonder how
> can I save the webpage created by CGI.pm into a standalone file such as
> "myhtml.html". I mean I don't want to print the content in browser ,but
> to a html file .can anyone help?
>
> Thanks .
>
> Alan
>
------------------------------
Date: Thu, 30 Nov 2000 05:31:43 -0500
From: brian d foy <brian+usenet@smithrenaud.com>
Subject: Re: how to print webpage into a *.html file?
Message-Id: <brian+usenet-22641A.05314330112000@news.panix.com>
In article <CJpV5.18029$II2.1784175@newsread2.prod.itd.earthlink.net>,
"Ed Grosvenor" <secursrver@hotmail.com> wrote:
> Of course, if you have to both save the HTML file and print it, here's what
> you can do...
it's much easier to use IO::Tee.
--
brian d foy
Perl Mongers <URL:http://www.perl.org>
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
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 4994
**************************************