[8524] in Perl-Users-Digest
Perl-Users Digest, Issue: 2141 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 20 01:07:48 1998
Date: Thu, 19 Mar 98 22:00:34 -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 Thu, 19 Mar 1998 Volume: 8 Number: 2141
Today's topics:
Re: "Premature End of Script Headers" <alexlane@ghg.net>
Re: Backreference problem <bholzman@mail.earthlink.net>
Re: Backreference problem <danboo@negia.net>
Re: Bitwise? (Jim Michael)
CGI script failing...asking for hint re: error msg <alexlane@ghg.net>
dis gotta be a easy one?!?!?! <hldpub@ix.netcom.com>
Re: display lines (Martin Vorlaender)
Re: Getting another servers environmental variables <bholzman@mail.earthlink.net>
Re: Help with Formats (Samuel G. Williams)
Help with Perl code <n2007363@sparrow.qut.edu.au>
I'm new and need help <csoul@geocities.com>
Re: Newbie question: using split() while ignoring regex (Colin Kuskie)
Re: Objects: Effective communication among siblings? <uri@sysarch.com>
Oraperl - Stored Procedures How to ?? <psutraye@cisco.com>
Re: Perl Daemons (Neil Briscoe)
Re: Perl Daemons <bholzman@mail.earthlink.net>
Re: perl script won't work as cgi <bholzman@mail.earthlink.net>
Perl5 equivalent to freopen <philh@asptech.com>
Re: Problem opening very large file with Perl 5.004 on (Jason Gloudon)
Re: Problem with "goto" in Perl (dave)
Remote access to MS Access using Perl. (Francis Hartojo)
Re: searching a file in Perl debi@dnaco.net
Re: Selling Perl applications effectively <chasecreek.systemhouse@usa.net>
Sending JavaScript variables through a form to PERL tufgar@golden.net
Re: Sending JavaScript variables through a form to PERL <bholzman@mail.earthlink.net>
Re: Using perl code as a config file syntax? (Or, can r (dave)
Re: Win32 Perl and ODBC New User Problems <rothd@xrxoxtxhx.xnxextX>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Mar 98 04:27:14 GMT
From: "Alex Lane" <alexlane@ghg.net>
Subject: Re: "Premature End of Script Headers"
Message-Id: <01bd53b8$a8048bc0$a26c42ce@zaika>
I tried your idea, adding
print $!;
which returned a message to the effect that the file (which was there)
could not be found.
What gives?
Cheers...
--
alexlane@ghg.net ...speaking only for myself
Seabrook, Texas http://www.ghg.net/alexlane
PGP fingerprint: 7FDB06E2478479B4 323CA94865AA5BC2
"No plan survives initial contact with the enemy." -- Von Moltke
"...but without a plan, *you* will not survive." -- Lane
Richard Bellavance <charlot@CAM.ORG> wrote in article
<6emalr$aid@stratus.CAM.ORG>...
> In article <350d1527.26893387@news.fas.harvard.edu>,
> Lee Feigenbaum <feigenb@hcs.harvard.edu> wrote:
> >I've got it printing out a header, (and it does print the header (as
> >regular text) when run in offline debug mode:
> >
> >i get
> >
> >Content-Type: text/html
> >
> ><HTML><HEAD>etc..
> >
> >That header should suffice... I'm not at all sure whta's going on...
> >oh well
> >
>
> You probably have an error lurking somewhere in the script when called
> from CGI. Here's a way to catche those:
>
> Make a "wrapper" CGI script like this:
> #! /path/to/perl
> print "Content-type: text/plain\n\n";
> exec '/path/to/your/perl_script';
>
> On Win32, you might need to change the last line to:
> exec '/path/to/perl', '/path/to/your/script';
>
> And call this instead of your script.
>
> HTH,
> Richard.
> --
> Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
> "All along this path I tread / My heart betrays my weary head
> With nothing but my love to save / From the cradle to the grave"
> (Eric Clapton, "From the cradle")
>
------------------------------
Date: Thu, 19 Mar 1998 22:14:26 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: Dan Boorstein <dboorstein@shopcfn.com>
Subject: Re: Backreference problem
Message-Id: <3511DF12.91BC2568@mail.earthlink.net>
> > Still better (in my view) is
> >
> > $StringToBeChanged =~ s/_/01_/;
> >
> > which removes the need for the match variable entirely.
>
> perhaps it does, but it also changes the meaning of the regex. consider:
> $StringToBeChanged = 'double_trouble_test';
How, exactly, does it change the meaning?
------------------------------
Date: Fri, 20 Mar 1998 00:29:42 -0500
From: Dan Boorstein <danboo@negia.net>
To: Benjamin Holzman <bholzman@mail.earthlink.net>
Subject: Re: Backreference problem
Message-Id: <3511FEC6.3A7E16D9@negia.net>
Benjamin Holzman wrote:
>
> > > Still better (in my view) is
> > >
> > > $StringToBeChanged =~ s/_/01_/;
> > >
> > > which removes the need for the match variable entirely.
> >
> > perhaps it does, but it also changes the meaning of the regex. consider:
> > $StringToBeChanged = 'double_trouble_test';
>
> How, exactly, does it change the meaning?
good question. let's try an example and see:
#!/usr/bin/perl -w
$StringToBeChanged1 = 'double_trouble_test';
$StringToBeChanged1 =~ s/_/01_/;
print $StringToBeChanged1, "\n";
$StringToBeChanged2 = 'double_trouble_test';
$StringToBeChanged2 =~ s/(.*)_/${1}01_/;
print $StringToBeChanged2, "\n";
results in:
double01_trouble_test
double_trouble01_test
the first substitution only allows one match which will be the first one
found. in this case the underbar after 'double' is replaced with '01_',
and the program continues.
in case two the .* allows the regex to match the last underbar due to
its greedy nature.
now, given that the original poster only ever has one underbar in his
strings, then these will behave similarly. however, all we were shown
was a variable name, and no possible values. for this reason i thought
it was important to keep the behavior the same; to show him a general
solution, without making assumptions about his data or intent.
hope this helps,
dan
------------------------------
Date: Fri, 20 Mar 1998 03:12:25 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Bitwise?
Message-Id: <genepoolEq3Kwp.LAq@netcom.com>
Steve George (stgeorge/$PAMLESS/@amug.org) wrote:
: Hmm.. Hallo, I'm new to this conf and not sure of exact context, but
: isn't that "a bit (!) weighty" if you have exclusive-or (^) availible..?
Ouch. Terrible pun :-)
: $A ^ $B: 1010
: This gives "misses," complement for matches.
Of course, TIMTOWTDI.
Cheers,
Jim
--
My dog ate my truth tables.
------------------------------
Date: 20 Mar 98 03:14:56 GMT
From: "Alex Lane" <alexlane@ghg.net>
Subject: CGI script failing...asking for hint re: error msg
Message-Id: <01bd53ae$8b7a39a0$a26c42ce@zaika>
I have a RedHat Linux 4.2 box set up and am trying to run a cgi script
written in Perl.
An attempt is apparently being made to execute the script, but the
following appears in the error_log file:
exec of <script name and path> failed, errno is 2
<date/time> access to <script name and path> failed for <user>, reason:
Premature end of script headers.
Might someone be able to shed some light on what's wrong here? Thanks in
advance.
Cheers...
alexlane@ghg.net ...speaking only for myself
Seabrook, Texas http://www.ghg.net/alexlane
PGP fingerprint: 7FDB06E2478479B4 323CA94865AA5BC2
"No plan survives initial contact with the enemy." -- Von Moltke
"...but without a plan, *you* will not survive." -- Lane
------------------------------
Date: Thu, 19 Mar 1998 21:22:25 -0800
From: hld <hldpub@ix.netcom.com>
Subject: dis gotta be a easy one?!?!?!
Message-Id: <3511FD11.34B1@ix.netcom.com>
hi,
How do you excute a ./filename.cgi to test for syntax errors
if you don't have a shell account or telenet access.
Have cgi bin thru FTP only.
Got cute ftp pro
Got wsftp
theres gotta be another way...is there?????
thanks
hector
------------------------------
Date: Fri, 20 Mar 1998 02:46:15 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: display lines
Message-Id: <3511ca67.524144494f47414741@radiogaga.harz.de>
Chuck Stewart (cstewart@flash.net) wrote:
: I need to display a delimited file that has 1000 lines at 50 lines at
: a time so the html is not so huge. How can I do this?
You need to preserve state in the stateless HTTP protocol. Have a look
at Randal Schwartz' WebTechniques column #2, where he discusses just that:
http://www.stonehenge.com/merlyn/WebTechniqes/col02.html
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 19 Mar 1998 22:21:51 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: joshmccormack@yahoo.com
Subject: Re: Getting another servers environmental variables
Message-Id: <3511E0CF.427D0225@mail.earthlink.net>
You can't.
joshmccormack@yahoo.com wrote:
>
> I've seen the scripts that tell you what the environmental variables are for
> the server you're using (http://www.getscript.com/variable.cgi), but I'd like
> one that could get them for any server. Connected to a form, user puts in name
> (i.e. www.scriptsearch.com) and gets the data. Would I just need to use one of
> the Perl scripts that get your own data and change $ENV to something and make
> an HTML page with a form something like this:
>
> <form action="http://www.getscript.com/variable.cgi" method=GET>
> Enter the name of the site to ask below: (eg. www.phillynews.com)<br>
> <input name=server value="" type=text size=48><br>
> <input name=action value="Tell me" type=submit>
> </form>
>
> Thanks for the help,
>
> Josh
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 20 Mar 1998 05:48:54 GMT
From: samw@wwa.com (Samuel G. Williams)
Subject: Re: Help with Formats
Message-Id: <6et006$g81$1@hirame.wwa.com>
Unfortunately, the text is being display in a Groupwise email client
window. I think I could work with something else. The results as you might
imagine look good when viewed on a normal terminal, but in the email
client they look like ....., well bad!
Any recommendations you can provide would be greatly appreciated.
Sam
Eric Bohlman (ebohlman@netcom.com)
wrote: : Samuel G. Williams <samw@wwa.com> wrote:
: : I am currently having a problem using formats. Well actually not formats per se,
: : but instead the way in which their results are ultimately displayed in proportional
: : spaced fonts under windows. I have a program that produces a security report in
: : tabular form using formats. Unfortunately all the whitespace gets compressed for
: : windows users working with proportional spaced fonts. Is there any way to clean
: : this up? For instance, is there a way that a format statement could be made to pad
: : the fields with periods or underscore characters instead of whitespace?
: That won't do you any good. The problem is that with a proportional
: font, your *non-filler* sections have variable widths, so you have no way
: of knowing how many filler characters to put between them.
: Exactly how is the report being displayed by your users? Are they copying
: the file directly to a printer? Loading it into a word processor?
: Viewing it on a Web browser?
--
Sam Williams wb5yni samw@wwa.com
Systems Programmer Staff Specialist samw@sinnfree.org
---------------------------------------------------------------------------
simplicity is the ultimate form of sophistication....
Leonardo Da Vinci
------------------------------
Date: Fri, 20 Mar 1998 13:10:27 +1000
From: MARK AMBROSE <n2007363@sparrow.qut.edu.au>
Subject: Help with Perl code
Message-Id: <Pine.OSF.3.93.980320130756.28418A-100000@sparrow.qut.edu.au>
Just a little help to a newbie please...
With the use of Regular Expressions, how do I code it so that in a
particular line of text, it recognises instances of double letters, or
double characters, and makes them appear in parentheses.
For example, if a line of text had :-
John Rutter : 23423423 : Chicago
It would print out
John Ru(tt)er : 23423423 : Chicago
Any help appreciated
Regards, Mark
------------------------------
Date: 20 Mar 1998 02:57:59 GMT
From: "Andrew" <csoul@geocities.com>
Subject: I'm new and need help
Message-Id: <01bd53ac$8280c780$11149a8e@psmith1.ican.net>
Dear everyone,
Hey I;m Andrew. I'm new at PERL and I need help. Ok, is there a PERL
compiler for Windows 95 I can get that I don't have to run through dos?
Could someone e-mail me a list of necessary programs to program PERL?
Thanks a bunch,
Andrew
------------------------------
Date: 19 Mar 1998 16:58:44 -0800
From: colink@latticesemi.com (Colin Kuskie)
Subject: Re: Newbie question: using split() while ignoring regexps
Message-Id: <6esf04$g9m@sarek.latticesemi.com>
In article <351178DB.7132@unixg.ubc.ca>,
Nick Bouton <nbouton@unixg.ubc.ca> wrote:
>
>Before I get flamed for posting a newbie question (as most newbies in
>here seem to have happen), I'd just like to point out that I've
>consulted the Camel book, as well as about 3 other Perl books on this
>subject, but either I've missed something or there just isn't a more
>efficient way to do this.
Let's make a few things clear:
1) Just being a newbie does not get you flamed. Putting 'newbie' in
the subject line may get you killfiled by some people, but it
doesn't translate into auto-flame.
2) Posters get flamed for poor netiquette:
- Posting articles that are difficult to read or ugly.
- Requesting that you send email because they don't read this group.
- Asking questions that don't belong in this group.
3) Most newbies could find the answers to their questions by:
- Reading the documentation that comes with perl.
- Reading the perl FAQ list (available at www.perl.com) and
comes with perl.
- Bothering to try searching news archives at Alta Vista
and/or Deja News
>Okay, my question/quandary.
[Code and examples deleted. You want to know how to parse comma
separated values (CSV's) with embedded comma's]
Check out #3 above to find the answer to your question.
-------
Just Another Weary Perl Hacker
Colin Kuskie
------------------------------
Date: 19 Mar 1998 22:35:11 -0500
From: Uri Guttman <uri@sysarch.com>
To: "Rael Dornfest" <rael@dnai.com>
Subject: Re: Objects: Effective communication among siblings?
Message-Id: <x7btv2hw5r.fsf@sysarch.com>
"Rael Dornfest" <rael@dnai.com> writes:
> I've performed a fairly comprehensive scan of the Perl books, FAQs, MAN
> Pages, and newsgroups but can't seem to find much on the topic of an
> object referencing its siblings. What I mean is...
>
> I have an array of objects -- let's call it @array_of_objects.
> I want each object to be able to communicate with its siblings -- in
> other words, I want $array_of_objects[0] to be able to talk to a method
> lookup() in $array_of_objects[1] and vice-versa.
>
> Is there a snazzier method than passing in a reference to the
> array @array_of_objects?
not that i know of. you want back pointers which don't come in to being
except when you make them. instead of passing in a ref to
@array_of_objects in every call, try passing i in once when you call
$obj_ref = new Object( args,... \@array_of_objects)
and making a field in Object which stores the ref.
hth,
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
uri@sysarch.com --------- Resume and Perl Example at http://www.sysarch.com
Use the Best Search Engine on the Net -------- http://www.northernlight.com
------------------------------
Date: Thu, 19 Mar 1998 18:50:04 -0800
From: Bhanu Sutraye <psutraye@cisco.com>
Subject: Oraperl - Stored Procedures How to ??
Message-Id: <3511D95C.2E9B@cisco.com>
Oraperl is very easy and efficient. Accepted.
I have problems with stored procedures/functions.
Requirement:
1. I need to call a stored procedure /function passing some parameters
and returning parameters either through return statement in function
or OUT params in stored procedure.
oraperl works when the bound parameters to the function/procedure is
initially allocated and it has to have more space than the returned
value.
2. How can I pass an array of values and return an array of values to
a procedure in oraperl.
I wrote the following code.
sql code:
---------
create or replace package sp_pack as
TYPE sp_arr IS TABLE OF varchar2(20)
INDEX BY BINARY_INTEGER;
procedure my_proc( p_name in varchar2, p_ret in out number );
procedure my_proc_arr( p_name in sp_arr, p_len integer );
end sp_pack;
/
create or replace package body sp_pack as
procedure my_proc ( p_name in varchar2, p_ret in out number )
is
begin
insert into junk ( name ) values ( p_name );
p_ret := 10;
--
commit;
end my_proc;
procedure my_proc_arr( p_name in sp_arr, p_len integer )
is
i integer;
begin
FOR i in 1..p_len LOOP
insert into junk ( name ) values( p_name(i) );
END LOOP;
end my_proc_arr;
end sp_pack;
/
show errors;
perl code:
----------
#!/usr/local/bin/oraperl
require "sp_common.cgi"; # our local connecting machnism
&login;
# this works
#$sql = "
# begin
# sp_pack.my_proc( :1, :2 );
# end;
# ";
# this does not work.
$sql = "
begin
sp_pack.my_proc_arr( :1, :2 );
end;
";
$csr = &ora_open( $lda, $sql ) || die $ora_errstr;
print "OPENED\n";
#$x = "bhanu"; for my_proc
@x = ( "bhanu", "sutraye", "prakash", "shankr" ); # for my_proc_arr
# this variable has to be big enough to hold the return value from
#the stored procedure.
$y = 20;
&ora_bind($csr, @x, $y) || die $ora_errstr;
print "BOUND\n";
#&ora_do( $lda, $sql ) || die $ora_errstr;
&ora_close( $csr );
print "CLOSED\n";
print $y, ":\n";
&ora_do( $lda, 'commit' ) || die $ora_errstr;
print "DONE";
&logoff;
exit(1);
~
----------------------------------------
--
============================================
Bhanu P Sutraye
Home Phone: 408 732 5137
Work Phone: 408 527 6129
email: bhanus@hotmail.com
============================================
------------------------------
Date: 20 Mar 1998 02:50:47 GMT
From: neilb@zetnet.co.uk (Neil Briscoe)
Subject: Re: Perl Daemons
Message-Id: <memo.19980320025045.45795A@skep.compulink.co.uk.cix.co.uk>
In article <3512389d.8190327@news.mindspring.com>, kucera@mindsrping.com (
Mark Kucera) wrote:
> hi, i have a perl script that i want to make into a daemon. how would
> i go about doing it?
>
> i have seen some programs for win32 that change perl scripts to exe
> files? is there a similar program for unix?
>
> thanks for your help..
>
There is a Perl compiler which will turn most perl into native executable
code - see http://www.perl.com for details.
That, of itself, however, will not make your code into a daemon.
A daemon is normally characterised by the fact that, if invoked from the
command line, it will subsequently detach itself from the terminal and
run, until terminated by a signal.
The code to do this is :-
#!/usr/local/bin/perl
if (fork()) { # Invoke a child
if (fork()) { # Child invokes a grandchild
while (($pid = getppid()) !- 1) { # Wait until init adopts us
sleep(1);
}
do_stuff(); # Go and do what our daemon does
exit;
}
exit; # Child immediately dies, orphaning grandchild
}
wait; # Wait for child, and reap it
exit;
sub do_stuff {
# Your code goes here
}
I hope the above helps.
Regards
Neil
------------------------------
Date: Thu, 19 Mar 1998 22:40:33 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: neilb@zetnet.co.uk
Subject: Re: Perl Daemons
Message-Id: <3511E531.64FE39C0@mail.earthlink.net>
> The code to do this is :-
>
> #!/usr/local/bin/perl
>
> if (fork()) { # Invoke a child
This is unlikely be very helpful in win32, I believe...
------------------------------
Date: Thu, 19 Mar 1998 22:07:24 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: "Doran L. Barton" <fozz@mail.xmission.com>
Subject: Re: perl script won't work as cgi
Message-Id: <3511DD6C.51B044AD@mail.earthlink.net>
Doran L. Barton wrote:
>
> I don't see the required MIME headers anywhere in your code. Add this at the
> top of your script:
>
> print "Content-type: text/html\n\n";
This isn't a MIME header. It's an HTTP header.
------------------------------
Date: Thu, 19 Mar 1998 22:38:03 -0800
From: Phil Hutchinson <philh@asptech.com>
Subject: Perl5 equivalent to freopen
Message-Id: <35120ECB.2B44@asptech.com>
I'd like to redirect STDOUT and STDERR to a disk file and the following
successfully doesn't work.
close(STDOUT);
close(STDERR);
$filename = "/var/appl/data.out";
open(FILE, $filename);
STDOUT = FILE; <----this is where it breaks down
STDERR = FILE;
Several books at Barnes and Nobles did not address this topic.
=================================================================
Philip L. Hutchinson, President phone: 970-686-1211
ASP Technologies, Inc. 800-516-0841
1200 Carousel Drive, Suite #103 fax: 970-686-7075
Windsor, Colorado 80550 USA
email: philh@asptech.com
=================================================================
------------------------------
Date: Fri, 20 Mar 1998 02:30:36 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Problem opening very large file with Perl 5.004 on Solaris
Message-Id: <slrn6h3l3r.m77.jgloudon@manitoba.bbn.com>
In article <35117f1c.6836750@news.isocor.com>, Ronan Cremin wrote:
>Hi,
>
>I'm trying to open a very large (14Gb) file for reading using Perl
>5.004 on Solaris 2.6
>Is there a limit on the size of file that Perl can open?
A 14 gig file requires 64 bit file pointers, which are available in
Solaris 2.6 through the 64 bit file interface. However perl (the standard
distribution) does not support using this interface.
--
Jason Gloudon
------------------------------
Date: Fri, 20 Mar 1998 04:30:28 GMT
From: meet@the.zoo (dave)
Subject: Re: Problem with "goto" in Perl
Message-Id: <3511ecf6.16760041@news.isoc.net>
On Mon, 16 Mar 1998 22:49:14 +0000, Rosemary I H Powell
<Rosie@dozyrosy.demon.co.uk> wrote:
>Gotos were in use before the early/mid 1960s, which when I first tried
>my hand at programming.
>
>Rosemary
>showing her age :-((
$loveConcerts and
goto ( ELVIS, FABFOUR, ELTON, MICHAEL, GARTH )
[ ( $yourBirthDate - 1930 ) / 10 ];
I like gotos :)
Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlripberXisoc.net (sub X with shunned char)
http://www.isoc.net/dlripber
/--\./==\./ee\./oo\./--\
------------------------------
Date: 20 Mar 1998 02:08:54 GMT
From: francis@az.stratus.com (Francis Hartojo)
Subject: Remote access to MS Access using Perl.
Message-Id: <6esj3n$f47@transfer.stratus.com>
Hi, I'm starting to venture into the DB world and just wondering if the
following is possible:
I've got an HP-UX box which has Perl 5.004_04 installed. I've also got
an NT 4.0 box which has MS Access (I don't know which version)
installed. Is there a module available that'd allow me to write a Perl
script on the the HP-UX box to access (i.e., read/write) the Access
database that resides on the NT box? Via ODBC preferably?
I've looked at the DBI, DBD::ODBC and Win32::ODBC modules but they all
seem to require the script and the database to reside on the same
machine (i.e., the NT box). Of course, I could be mistaken.
I'd really appreciate any pointers/suggestions you can give me. Should I
succeed, I'll post a summary if anyone's interested.
Thank you very much in advance.
--
+------------------------+-------------------------------------------------+
| Francis Hartojo | Ph.: 602-852-3195 [Stratus doesn't endorse my |
| Stratus Computer, Inc. | Fax: 602-852-3093 opinions. |
| francis@az.stratus.com | Which is a shame, really.] |
------------------------------
Date: Thu, 19 Mar 1998 22:55:31 -0600
From: debi@dnaco.net
Subject: Re: searching a file in Perl
Message-Id: <6esso8$kkp$1@nnrp1.dejanews.com>
In article <ebohlmanEq259B.Ln8@netcom.com>,
or you can spawn out to the shell and ===>
grep searchin_for filename_1 filename_2
=== OR =====
grep searchin_for `find . -name "8*.html" -print`
debi
http://www.dnaco.net/~debi
>
> tony <td@lavalink.com.au> wrote:
> : I was wondering how would it be done if you wanted to search two or more
> : files at the same time? ie: filename1 filename2 ...
>
> See the section in perlop.pod on the "null filehandle" AKA the "diamond
> operator."
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 20 Mar 1998 02:06:45 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Selling Perl applications effectively
Message-Id: <3511CDD9.4DB8E532@usa.net>
Yes, that is on my mind as well and the only way around it is to
write the middle piece in C - compile - have the applications
revolve around that 'keyed' piece...
Not a good solution...
I believe, if I understand the Perl compiler project (and what Tom C
has mailed me about recently) that this problem may be resolve to
the perl5-ports satisfaction in Perl 5.005 or there-abouts...
Sneex :-)
Doran L. Barton wrote:
> I would like to know if anyone has come up with a way to sell
> applications written in Perl without the risk of the buyer plagerizing
> your code.
>
> Thanks in advance.
>
> -Fozz
------------------------------
Date: Thu, 19 Mar 1998 23:09:52 -0500
From: tufgar@golden.net
Subject: Sending JavaScript variables through a form to PERL
Message-Id: <3511EC0F.EB8F5D1D@golden.net>
Hi,
I was wondering of there is anyway to send a JavaScript variable and
some other form data, to a PERL program through a form.
Thanks in Advance.
------------------------------
Date: Thu, 19 Mar 1998 23:20:08 -0500
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: tufgar@golden.net
Subject: Re: Sending JavaScript variables through a form to PERL
Message-Id: <3511EE78.52CF6A9E@mail.earthlink.net>
Yes. It's called 'CGI'.
HTH,
Benjamin Holzman
tufgar@golden.net wrote:
>
> Hi,
> I was wondering of there is anyway to send a JavaScript variable and
> some other form data, to a PERL program through a form.
>
> Thanks in Advance.
------------------------------
Date: Fri, 20 Mar 1998 04:38:10 GMT
From: meet@the.zoo (dave)
Subject: Re: Using perl code as a config file syntax? (Or, can require return more then one value?)
Message-Id: <3511f250.18130083@news.isoc.net>
On 19 Mar 1998 09:18:57 -0500, Jonathan Feinberg <jdf@pobox.com>
wrote:
>Zenin <zenin@archive.rhps.org> writes:
>
>> I'm trying to use a perl file as a config file. The file would look
>> something like this:
>>
>> (
>> FOO => [ 'some', 'foo', 'options' ],
>> BAR => [ 'some', 'bar', 'options' ],
>> );
>
>Have you looked into (and rejected) Data::Dumper?
Hmmm .. I was also thinking how difficult it would be to save configs
as perl source. Does Dumper do it?
Thanks,
Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlripberXisoc.net (sub X with shunned char)
http://www.isoc.net/dlripber
/--\./==\./ee\./oo\./--\
------------------------------
Date: 20 Mar 1998 04:25:46 GMT
From: "Dave Roth" <rothd@xrxoxtxhx.xnxextX>
Subject: Re: Win32 Perl and ODBC New User Problems
Message-Id: <01bd53b8$a55682c0$0101a8c0@main2>
David Griffis <davidg@infinex.com> wrote in article
<351152ae.135650104@news.infinex.com>...
> On Sun, 08 Mar 1998 15:11:50 GMT, keefner@visi.com
(keefner) wrote:
>
> >On Wed, 04 Mar 1998 05:37:05 GMT, davidg@teleprompt.com
(David
> >Griffis) wrote:
> >
> >>I'm trying to get Activeware Win32 Perl 5.003 build 315
and Dave
> >>Roth's ODBC extention working with my NT 4.0 ODBC for
Oracle 733 but
> >>I'm getting a 'parse error'. What could I have done
wrong?
> >
> >You likely have the stock odbc driver for Oracle
installed
> >and there is a documented problem with it. Make sure
> >you get the latest from Oracle.
> >
> >Depending on how you want to access the Oracle
> >db (stored functions/procedures/etc) you may want
> >to consider the DBI/DBD modules and the perl port
> >for it.
> >
> >Craig
>
> Craig,
>
> It would be nice if I could get the odbc working so it
doesn't matter
> what database I'm using.
>
> I got the latest Oracle odbc and even tried with the
access and odbc
> but no luck.
>
> I think that build 315 or 315 doesn't work with ODBC
970208.
>
> It's also confusing how to apply the patches.
>
> Does anyone have a version of Perl and ODBC 970208 that
works
> together.
>
> Right now it's not fetching any data.
Okay, here is the scoop. ActiveState's Perl comes in
several different builds. Every once in awhile a new build
will break compatibility with extensions. For example if
you use Win32::ODBC that was built for AS's Win32 Perl
build 307 with the build number 312 of Perl there will be
an exception error. Yeah, I know, it sucks, but hey, what
can you do?
The solution is to download a build of the extension that
best matches your build of perl. For example, build 311
extensions are compatible with AS Win32 Perl build 311-315.
So since you are using Perl build 315 you need Win32::ODBC
build 311.
Now that isn't so bad is it? ;)
You need:
ftp://ftp.roth.net/pub/ntperl/odbc/970208/bin/ODBC_970208_31
1.zip
****READ the README file in the zip archive on how to
install it****
dave
--
============================================================
====
Dave Roth ...glittering
prizes and
Roth Consulting endless compromises,
shatter
rxoxtxdxxrxoxtxhx.xnXeXt the illusion of
integrity
My email address is disguised to fool automailers. Remove
the
X's to send me email.
************************************************************
****
Use of this message or email address for commercial
purposes
(including "junk" mailings) is strictly prohibited and
protected
under current international copyright laws and United
States
Code, Title 47, Chapter 5, Subchapter II.
------------------------------
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 2141
**************************************