[12548] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6148 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 27 19:07:13 1999

Date: Sun, 27 Jun 99 16:00:21 -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           Sun, 27 Jun 1999     Volume: 8 Number: 6148

Today's topics:
    Re: "Learning Perl" exercise question (Abigail)
    Re: "Learning Perl" exercise question <tchrist@mox.perl.com>
    Re: "Learning Perl" exercises (Abigail)
    Re: Calling Oracle Stored Procedures from PERL (John D Groenveld)
    Re: CGI and SSI (Abigail)
    Re: check for NT process (Abigail)
    Re: chmod external file (Abigail)
    Re: compare number and string (Larry Rosler)
    Re: Comparing two associative arrays <tchrist@mox.perl.com>
    Re: Constant? (Abigail)
    Re: Explination of a be (Abigail)
    Re: FAQs and attitudes (was Re: How can I read a whole  (Larry Rosler)
    Re: floor and ceil (Abigail)
    Re: FMTEYEWTK on shell globbing <revjack@radix.net>
    Re: grep variants? (Abigail)
    Re: help.... (Abigail)
    Re: How can I read a whole file in one go ? (Tri Tram)
    Re: I need help with the Net::FTP module ! (brian d foy)
    Re: Losing Date/Time Information from Oracle Database (John D Groenveld)
    Re: offline testing of Perl/CGI's (Abigail)
        Pattern matching (Ryan Ngi)
    Re: Read news by Broswer (Abigail)
    Re: regex question (Abigail)
    Re: Scoping problem (Larry Rosler)
    Re: Viral matters [completely off-topic] <jcreed@cyclone.jprc.com>
    Re: Why is this broken... pelau@my-deja.com
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 27 Jun 1999 15:45:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: "Learning Perl" exercise question
Message-Id: <slrn7nd3b6.v72.abigail@alexandra.delanet.com>

Mike Dichirico (mdichirico@lamotionpictures.com) wrote on MMCXXVI
September MCMXCIII in <URL:news:7l4ca1$fhs$1@nnrp1.deja.com>:
== I'm reading "Learning Perl" and trying the exercises in them.  I'm
== using my Win98 computer as my platform.
== 
== On page 57, exercise #1, it says to wrte a program that reads a list of
== strings on seperate lines and prints out the list in reverse order.
== 
== Appendix A of the book gives the following code as one of the possible
== answers to the exercise:
== 
== print "Enter the list of strings:\n";
== @list = <STDIN>;
== @reverselist = reverse @list;
== print @reverselist;
== 
== When I run the program, it asks for me to enter a string like it's
== supposed to.  But after entering a string and hitting <Enter>, the
== program just hangs there.

Of course. It waits for more input. (Like Johnny 5). Type more lines,
followed by an eof (whatever that is on your platform, it's ^D on Unix).

==                            I have to hit <Ctrl> + Z to get back to my
== command prompt.
== 
== How come it isn't reversing my string like it's supposed to?  What am I
== not adding to the code that it's supposed to have?  TIA for any help.

Because it's not supposed to reverse the string! Read the exercise again.
It's supposed to reverse the *list* of strings. And if you give it only
one string, it's hard to find out whether the list is reversed or not,
isn't it?



Abigail
-- 
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??) 
             {s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 16:14:18 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: "Learning Perl" exercise question
Message-Id: <3776a23a@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, abigail@delanet.com writes:
:Of course. It waits for more input. (Like Johnny 5). Type more lines,
:followed by an eof (whatever that is on your platform, it's ^D on Unix).

Only by default.  I have seen this before:

    stty susp ^y eof ^z

--tom
-- 
I am a little more weird today than normal.  --Andrew Hume


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

Date: 27 Jun 1999 15:49:11 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: "Learning Perl" exercises
Message-Id: <slrn7nd3hr.v72.abigail@alexandra.delanet.com>

Mike Dichirico (mdichirico@lamotionpictures.com) wrote on MMCXXVI
September MCMXCIII in <URL:news:7l4rbq$keu$1@nnrp1.deja.com>:
## Please disregard this post.  It's an unintentionally submitted repeat
## post.  Thanks.  --Mike


Then cancel it instead of spamming this group for the second time.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 18:27:07 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Calling Oracle Stored Procedures from PERL
Message-Id: <7l68fr$fqu$1@grolsch.cse.psu.edu>

Oraperl.pm is a Perl5 module which provides emulation for Kevin Stock's
long-dead Perl4 extension oraperl. Oraperl.pm actually uses DBI/DBD::Oracle.
New versions of DBD::Oracle not only support SPs, but also cursor variables.

A few years ago, I recommended Oracle developers use the stable Oraperl.pm,
but now DBI.pm includes several methods that aren't included and the
number of people who use DBI with other non-Oracle databases has really
taken off.

John
groenveld@acm.org


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

Date: 27 Jun 1999 15:56:11 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CGI and SSI
Message-Id: <slrn7nd3uv.v72.abigail@alexandra.delanet.com>

Pippo (pippo@landptek.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:7l4u8c$vlb$1@aquila.tiscalinet.it>:
~~ 
~~ I use Apache as web server. How can I configure it to recognize SSI commands
~~ in dynamic pages generated on the fly by  perl CGI script.


You call Apache Tech Support.

What has Apache configuration to do with Perl?


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 15:58:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: check for NT process
Message-Id: <slrn7nd432.v72.abigail@alexandra.delanet.com>

Clinton Carr (ccarr@websocket.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:3775B05E.DA89CCE1@websocket.com>:
## Is there a way to check to see if a Win32 application is running?
## Is there a way to kill a running Win32 application?

Press some random keys on the keyboard, or wave with the mouse.
Chance are the OS will crash, and your application will terminate.

What does Win32 process management have to do with Perl?


Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 16:00:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: chmod external file
Message-Id: <slrn7nd46c.v72.abigail@alexandra.delanet.com>

Eric v.d. Lugt (vdlugt@kabelfoon.nl) wrote on MMCXXVI September MCMXCIII
in <URL:news:7l58mb$fpc$1@news.kabelfoon.nl>:
-- I have this script, which write's into an HTMLfile.
-- The problem is that the HTML file's chmodded 666.
-- What I want to do is that the script chmod's the HTML to 666 when it has to
-- write to it
-- and restores it to 755 when it's finished.
--
-- Could anyone tell me how to make this work?


It's impossible. I mean, the documentation mentions a function chmod,
but you should never trust the documentation; it's all lies and damned
lies.

I suggest using Visual Cobol ++ instead.



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 15:42:52 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: compare number and string
Message-Id: <MPG.11e048bbce1cfced989c5e@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <QGwd3.540$o_1.2948@news1.online.no> on Sun, 27 Jun 1999 
23:30:33 +0200, Jonas Larsen <jonaslar@online.no> says...
> I have got a problem!

Agreed.
 
> How do I compare these to variables?
> 
> Like this:
> 
> Suppose that the file has size 17 bytes.
> 
> $x=34/2;
> 
> $y=stat('filename')[7]; ( I think this gives the size of the file)

No, it doesn't.  Did you read `perldoc -f stat` before posting
your conjecture?  This does:

  $y = (stat 'filename')[7];

By the way, so does this, rather cleaner:

  $y = -s 'filename';

> Main question is:
> How do I compare x and y?

Comparisons of numbers and strings are determined by the operator used.  
'==' converts both operands to numbers if they aren't; 'eq' converts 
both operands to strings if they aren't.

Isn't Perl wonderful? 

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


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

Date: 27 Jun 1999 16:02:02 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Comparing two associative arrays
Message-Id: <37769f5a@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, abigail@delanet.com writes:
:Of course, it could also easily fail if there are keys and values that
:contain $" as a substring. Deja will show threads which shows that
:"@array1" eq "@array2" is the wrong way to test whether 2 arrays have
:the same content.

Ahem.  Arbitrary arrays.  It's wrong for *arbitrary* arrays.   For
specific arrays with restricted contents (say, those that you *know*
don't have $" in them), it's not wrong.

    @array1 = qw(a b c);
    @array2 = qw(x y z);

--tom
-- 
  "When a man sits with a pretty girl for an hour, it seems like a minute.
   But let him sit on a hot stove for a minute, and it's longer than any hour.
   That's relativity."   --Albert Einstein


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

Date: 27 Jun 1999 16:02:35 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Constant?
Message-Id: <slrn7nd4av.v72.abigail@alexandra.delanet.com>

Matthew Wilson (matthewwilson@matthewwilson.free-online.co.uk) wrote on
MMCXXV September MCMXCIII in <URL:news:l_bd3.3549$BS6.2651@wards>:
@@
@@ count = 1;  #And here is where the error occurs


You would not have to ask this question if you had used -w, or use strict.
You should be using both.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 16:04:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Explination of a be
Message-Id: <slrn7nd4e5.v72.abigail@alexandra.delanet.com>

Tim (bie@connect.ab.ca) wrote on MMCXXVI September MCMXCIII in
<URL:news:3775BFFC.471E@connect.ab.ca>:
?? 
?? I was wondering if someone could explain how a banner exchange works
?? with detail. How does the program know if the banner is seen? How does
?? it decide which to show? How does it work the click on the banner to go
?? to the right site?


And your Perl question is?

Ads on websites are evil.

Abigail
-- 
perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
          print chr 0x$& and q
          qq}*excess********}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 15:14:39 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: FAQs and attitudes (was Re: How can I read a whole file in one go ?)
Message-Id: <MPG.11e04221215b7b07989c5c@nntp.hpl.hp.com>

In article <slrn7nd197.v72.abigail@alexandra.delanet.com> on 27 Jun 1999 
15:10:28 -0500, Abigail <abigail@delanet.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MMCXXVI September MCMXCIII in
> <URL:news:MPG.11df207e5d066137989c52@nntp.hpl.hp.com>:
> -- In article <slrn7nas3k.npo.abigail@alexandra.delanet.com> on 26 Jun 1999 
> -- 19:29:53 -0500, Abigail <abigail@delanet.com> says...
> -- ...
> -- > $ cd ~/Src/perl5.005_57/pod
> -- > $ cat *.pod | grep -ci 'billtax'
> -- > 1
> -- > $ cat *.pod | grep -ci 'prisoner of bill'
> -- > 1
> -- > $
> --
> -- I think Randal owes you two Useless Use of Cat Awards for that.  Or 
> -- perhaps only one.  :-) 
> 
> Oh really? How would you do this without cat then?
> 
> (Hint: grep -ci 'billtax' *.pod doesn't give the same output, and quickly
> glancing over the man page of grep didn't enlighten me with a command line
> option that did.)

When the total count is 1, the summing done by the cat doesn't add 
information, and it loses the other datum produced by grepping the files 
themselves, the name of the file in which the single match is found.

OK.  So that's a special case.  However...

You could also get your exact result in general without cat, by:

grep -ci 'billtax' *.pod |
    perl -ne '/(\d+)$/ and $i += $1; END { print "$i\n" }'

I'm sure that last command would be easier to write in Awk, but I'm 
rustier in that these days and I'd better show some Perl here in any 
case.

OK, maybe your way was easier to write after all.  :-)

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


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

Date: 27 Jun 1999 16:07:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: floor and ceil
Message-Id: <slrn7nd4ju.v72.abigail@alexandra.delanet.com>

Kenneth Rose (kenrose@home.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:37766DBB.316C14F0@home.com>:
|| 
|| Just wondering if such functions exist: floor and ceil.  Floor would
|| return the greatest integer less than or equal to the argument.  Ceil
|| would return the least integer greater than or equal to the argument.


Why are you afraid to read the FAQ?  Did it bite you when you were a
little kid? Are you still a little kid and your mom doesn't read it
to you when you go to bed?



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 22:18:06 GMT
From: Seville Jeffersonian <revjack@radix.net>
Subject: Re: FMTEYEWTK on shell globbing
Message-Id: <7l67uu$j4t$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight

Tom Christiansen explains it all:

[snip]

:--tom "wondering who has really managed to read this far" christiansen

Are you kidding? I had to take my pants off towards the end there.


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

Date: 27 Jun 1999 16:10:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: grep variants?
Message-Id: <slrn7nd4pg.v72.abigail@alexandra.delanet.com>

William Herrera (posting.account@lynxview.com) wrote on MMCXXVI September
MCMXCIII in <URL:news:3775bec5.99392499@news.rmi.net>:
%% A came across a situation where I need to split an array into two
%% arrays according to a regular expression.
%% 
%% This is straightforward using foreach and if/else, of course. I
%% suspect that grep is more efficent than foreach though.
%% 
%% This made me wonder if anyone has ever made a module with a nice,
%% efficient (C I suppose) two-output grep function? I mean one sort of
%% like
%% 
%% dual_grep(/regex/, \@source, \@true, \@false);
%% 
%% which copies elements of @source for which /regex/ is true to @true
%% and the others to @false ?


@true = grep {/regex/ ? 1 : do {push @false, $_; 0}} @source;



Abigail
-- 
perl -wlpe '}{$_=$.' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 16:11:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: help....
Message-Id: <slrn7nd4r9.v72.abigail@alexandra.delanet.com>

Peter Hodder (peterh@stealth.com.au) wrote on MMCXXVI September MCMXCIII
in <URL:news:3775e8f6.23789941@news.griffith.stealth.com.au>:
@@ Where is the best web page to learn Perl?


http://www.deja.com



Abigail
-- 
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
          for (??;(??)x??;??)
              {??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 21:34:15 GMT
From: tram@olympic.seas.ucla.edu (Tri Tram)
Subject: Re: How can I read a whole file in one go ?
Message-Id: <FE0993.86L@seas.ucla.edu>


Try this:
open (FH, "file") || die "Can't open file: $!";
@record = <FH>;
close FH;

Janson; Mikhael (janson6@etu.unige.ch) wrote:
> Hello !

> I'm looking for the way to read a whole file in one go into an array,
> and not line by line.  

> Here I'm doing 
> @records = split/\<c\>/, <INPUTFILE>; 
> and of course, this syntax reads line by line, and will only grab the
> first line of my file.
> But to put the whole file into @records, there is a syntax, but I've got
> some trouble finding it ? 

> Thanx  !

> todatabase1.pl
> ____________________________________________________________
> #!/usr/bin/perl
> #
> # Program to convert texts to my db format
> #

> # Ask for the input file name
> print STDOUT "Enter the source file name: ";
> chomp($myinput = <STDIN>);

> # Set the book ID (dummy parameter at present stage)
> $book_id = 1;

> # Initialize the record counter variable
> $record_id = 1;

> # First open the input file
> open (INPUTFILE, "$myinput") or die "Can't find $myinput: !\n";

> # Read the whole file in one go and split it over the <c> marker
> # an array of records
> @records = split /\<c\>/, <INPUTFILE>;

> # Print in a format suitable for importing into a database, namely
> # lines of
> foreach $record_text (@records) {
>         print "$book_id \t $record_id \t $record_text \r\n";
>         ++$parag_id;
> }
> ________________________________________________________________




> -- 
> ======================================
>          janson6@etu.unige.ch
>            mik@passtech.org
> http://perso.wanadoo.fr/mikhael.janson
> ======================================

--
-----------------------------------------------------------------
Tri Tram, Computer Science and Engineering at UCLA
http://www.seas.ucla.edu/~tram


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

Date: Sun, 27 Jun 1999 18:12:11 -0400
From: brian@pm.org (brian d foy)
Subject: Re: I need help with the Net::FTP module !
Message-Id: <brian-ya02408000R2706991812110001@news.panix.com>

In article <7l64ej$v0n$1@nnrp1.deja.com>, o_klaus@my-deja.com posted:

> I was trying to write a Cgi with perl for having FTP-access !
> But I failed....
> Is anybody outthere who could send me a detailed description how to use
> this module - or does anybody know where I can get a short summary ?

did you read the included documentation?

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 27 Jun 1999 18:09:43 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Losing Date/Time Information from Oracle Database
Message-Id: <7l67f7$fps$1@grolsch.cse.psu.edu>

I suspect the environment under which your SQLPlus script and your CGI script
runs is different. Look for the NLS_DATE_FORMAT environment variable
as described in Chapter 4 of the Oracle 8 Reference Book.
John
groenveld@acm.org


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

Date: 27 Jun 1999 16:18:47 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: offline testing of Perl/CGI's
Message-Id: <slrn7nd59a.v72.abigail@alexandra.delanet.com>

Laar (laar@ix.netcom.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:3775b811.86772142@nntp.ix.netcom.com>:
__ --> Problem: I've tried everything, but I can't seem to get the HTML
__ doc to call the script properly. First, regardless of whether I
__ specify the GET or POST method in the HTML form, the form seems to try
__ to pass the data to the script with POST, and it invariably fails.
__ Both the HTML pages and the scripts I'm trying to test are in c:\perl\
__ and I've tried every possible combination of fixes (that I can think
__ of) from both the HTML and script sides, and at best, the browser
__ tries to download the script (as if downloading a file from on line)
__ instead of execute it.
__ 
__ Any ideas? Somebody? Please?


So, what's your Perl question?



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 20:15:48 GMT
From: ryanngi@hotmail.com (Ryan Ngi)
Subject: Pattern matching
Message-Id: <37768352.38701768@news.inet.co.th>

we have

".*?" <----- for finding any thing is match from Left to Right

such as

$x='/usr/local/bin/perl'

$st=~m!(/.*?)/!;
$st=$1;

we would get "/usr"

but if i want to find form Right to Left such as

$st=~s!(/.*)$!!;

it's not work, because there is "/" in front of the string.....

is there anyway to do the job like ".*?" do but do it in the reverse
way??????


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

Date: 27 Jun 1999 16:23:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Read news by Broswer
Message-Id: <slrn7nd5h1.v72.abigail@alexandra.delanet.com>

Tanya (tanya@i-cable.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:37762539.B9D065D8@i-cable.com>:
[] how i can read news in a newsgroup
[] by using a perl script in a broswer?


First you find a browser that can execute Perl scripts.
Then you write a Perl script that fetches an article from either
an NNTP server, or from a news spool and displays it in the browser.

Feel free to come back and ask more specific questions once you
start writing!



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jun 1999 15:41:47 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: regex question
Message-Id: <slrn7nd33o.v72.abigail@alexandra.delanet.com>

Gene Dolgin (Gened@ohinter.net) wrote on MMCXXVI September MCMXCIII in
<URL:news:37763557.82C201E4@ohinter.net>:
~~ I have a perl program to do a whois on a domain and pull the email of
~~ the administrative contact.  Here it is:
~~ #!/usr/bin/perl
~~ $whois2 = `whois SETSTYLE-dom`;
~~ $whois2 =~ /\).*\@.*\..*/m;
~~ print "$whois2\n";
~~ print "$1\n";
~~ print "$2\n";
~~ 
~~ For some reason, this always returns blanks.  What's wrong?


Well, you never set $1 and $2 ....



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 15:27:23 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Scoping problem
Message-Id: <MPG.11e0451fe83d30cc989c5d@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <377682d0.38572020@news.inet.co.th> on Sun, 27 Jun 1999 
20:02:11 GMT, Ryan Ngi <ryanngi@hotmail.com> says...
> give
> 
> $x=10
> 
> sub test{
> my($x)=3;
> return $x+$x; <--- the second x is x that is outside the scope(10)
> ,how to do that!?
> }

  return $x + $::x; <--- the second x is x that is outside the scope(10)
 
But I think you are some sort of masochist to do this (or a sadist if 
others have to manage this code).  :-)

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


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

Date: 27 Jun 1999 18:04:40 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Viral matters [completely off-topic]
Message-Id: <a14sjts3k7.fsf@cyclone.jprc.com>

andy barfoot <gt7202e@prism.gatech.edu> writes:

> Good grief, what's _that_ doing at language.perl.com?  Are the perldocs
> turning into the Hitchhiker's Guide to the Galaxy? 

#!/usr/bin/perl
$_ = <<'DONT_PANIC';
M73M61 `M2' VM5M5V 2MV 2M49 2VM 2M6M6 2M 2mM19V'" 5"`VM14 2M3A `M 2M2 2M2M
2 2VM 2M 2M15V" 17"VM9. 2'M2 2M 2M' .M2M2. 2M 2M 2MV 2VM7V' 22"VM9. 2" 2V 
2V .M3M2A 2V 2M 2M' ,M6V' 26"VM8. 2.2 5mM3M3A ` 5V 2M6' 30`VM6m 2"S" 3mM4M
4 2.,., 3AM4V 33`VM3"3 3: 3.M5M4 2"B" 3M5V 36M" 6.' 2.M6M4 3: 3AV" 2V 37` 
3.m2. 4M7M4. 2`. 46.2M5m 3M7M5.2 . 2.mM2V 2. 35. VM6A 3VM5M6 2AM6' 2* 34.*
 'M6m 4M5M5' 2M6V 2.I 33.a@. V'"M4A 4M4M5 3M6( 2a@:. 29.' @2! . 3"M3m 4M3M
4' 3M3V"2' 2!@a :. 25.';.a@2R , 13M2M3V 4MV" 3: 2:@3: :. 21.: 2a@4! .14mMM
3' 10. 2`@4 : `.3 13.2:' : a@5' M16M3 2.10 3@5a 2: 2:'`:`-6': 2: 2a@7 2M16
M14A 3`@7a 2: 2: 3:2 3: 2a@9' :M16M15. 3`@10a2A. .;|. .Aa2@9' .AM16M16. 3`
@31 3mM17M17. 4@11"oOo.oO2o"@7' 3mM18M18m 4`@7"O6xO5"@3V 4mM19M19A. 5`@3"O
8xO5"@' 3.AM20M21A. 5"2V@2AO6xO5. 2.AM22M24m. 7`O7xXO3o.mM24M27Am.2 3`O6ox
O4:M25M33A`O7xO4:M25M34A`O6xO4;M25M35A`O9;AM25M36A`O6;AM27M38m6M29
DONT_PANIC
s/\n//g;s/(.)(\d+)/$1x$2/eg;while(s/(.{73})//){print"$1\n"}


---Jason


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

Date: Sun, 27 Jun 1999 21:53:36 GMT
From: pelau@my-deja.com
Subject: Re: Why is this broken...
Message-Id: <7l66gt$vlg$1@nnrp1.deja.com>

In article <37768162.7B826BB8@home.com>,
  Mitch <portboy@home.com> wrote:

>                 if (/$old_line/)
>                 {
>                         if ($_ eq "$new_line\n")
>                         {
>                                 print OUT;
>                                 $rep = -1;
>                         }
>                         else
>                         {
>                                 print OUT "$new_line\n";
>                                 $rep = 1;
>                         }
>                         next;
>                 }
>                 print OUT;
>         }
>


It looks like you need to print OUT $old_line; whenever the test fails.
Or else you end up only printing lines that look like your $new_line
variable.

Dee


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

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

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