[7182] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 810 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 4 02:17:34 1997

Date: Sun, 3 Aug 97 23:00:38 -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, 3 Aug 1997     Volume: 8 Number: 810

Today's topics:
     ! Passing variables between perl scripts (Mwebernet)
     Re: "Fast forward" within while loop? (Thomas Wernitz)
     [Q]: Use a Variable to Provide $vars to Split? <hollyhp@nospam.one.net>
     Re: A simple form mail script <rootbeer@teleport.com>
     Re: Agent that traces the URLs the user looks at (Rubinstein Dmitry)
     Re: Agent that traces the URLs the user looks at (Matthew Burnham)
     Re: Any nice "Powered by Perl" gifs? <sfairey@adc.metrica.co.uk>
     Re: Appending Arrays <rootbeer@teleport.com>
     Re: Appending Arrays (M.J.T. Guy)
     Re: Appending Arrays (Tad McClellan)
     Re: ARRGH!  This class has no class (Jahwan Kim)
     Re: breaking a string into 80 chars (Joshua J. Kugler)
     Carriage Return Problem <bez@interlook.com>
     Re: CGI and foreign languages?? <maryesme@3-cities.com>
     Re: CGI Script that searches a web sites (Burt Lewis)
     Re: CGI.pm and embedded perl <dougm@osf.org>
     Re: comments in regular expressions (wish list) Steve_Kilbane@cegelecproj.co.uk
     Conversion of Word Processing files <kar@webline.dk>
     Re: Date::Manip Error (J. Paul Reed)
     Re: Evaluating Strings (Tad McClellan)
     Re: free perl interpreter <BetaMan>
     Re: Getting variables from checkboxes??? (Burt Lewis)
     Re: Help! Win32::ODBC *and* GD working at once? <rothd@roth.netX>
     Help.. (Altfnine)
     how do I get rid of line feeds from string? (Bruce Spedding)
     Re: how do I get rid of line feeds from string? (Eric Bohlman)
     Re: How to compare references? <rootbeer@teleport.com>
     Re: How to make a username/password entry box? <rootbeer@teleport.com>
     Re: howto import other perl file into current one?? <rootbeer@teleport.com>
     Linking regcmp in XS module on HP-UX <softstar@pol88a.polito.it>
     linux perl script, modified for NT <tant@topo.auth.gr>
     Re: linux perl script, modified for NT (Matthew Cravit)
     Looking for good perl... <deputy-_-dawg@msn.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 4 Aug 1997 01:51:55 GMT
From: mwebernet@aol.com (Mwebernet)
Subject: ! Passing variables between perl scripts
Message-Id: <19970804015100.VAA19044@ladder02.news.aol.com>

I want to call a seperate perl script (script2.pl) from the script I am
currently in (script1.pl).  Here is the tricky part.  Script2.pl needs the
variables that script1.pl receives from the form....

Any help is appreciated:
email: mwebernet@aol.com

http://cow.dyn.ml.org/caboose/


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

Date: 1 Aug 1997 02:30:09 GMT
From: thomas_wernitz@tait.co.nz (Thomas Wernitz)
Subject: Re: "Fast forward" within while loop?
Message-Id: <5rrhnh$15v@gatekeeper.tait.co.nz>

>> I often need to extract certain number of lines from a file.
>> Sometimes I know how many lines I want, sometimes I
>> know what the starting and ending lines are. It would be
>> convenient if I could just ask the while loop to advance
>> so many lines, once I have identified the starting line,
>> without the lines being processed by other statements
>> in the while loop. I am now doing this by turning on and
>> off a boolean variable. It gets very confusing if I need
>> to do a few of these within the same while loop.
>> 
>> Is there a good construct in Perl that does this more
>> efficiently? 

Here is a good one:

while (<>) {
  
  map({$_=<>} @CHUNK[0..10]), next if /whatever startline/;

  ...

}

This reads 11 lines into @CHUNK and skips the rest of the while loop!

HTH,
Thomm


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

Date: Sun, 03 Aug 1997 17:17:35 -0400
From: Holly Henry-Pilkington <hollyhp@nospam.one.net>
Subject: [Q]: Use a Variable to Provide $vars to Split?
Message-Id: <33E4F56F.43F8@nospam.one.net>

I have some lovely perl code that does just what I want it to do. In the
interest of making it good and recyclable, I've included a section of
user-defined variables at the top to replace hardcoded values elsewhere
in the program.

I have one area of said lovely perl code that doesn't like a variable
array of variable names, and that is a split command. Said variable
array might be defined something like this:

    @split_fields=($fee, $fi, $fo, $fum)

in the interest of being able to feed these $variables to split in a
command that is currently written like this:

    ($fee, $fi, $fo, $fum) = split (/$delimiter/, $line_to_be_split)

The values of the $variables seem to end up to be commas (judging by
inserting a print command after the split) if I try to use:

    (@split_fields) = split (/$delimiter/, $line_to_be_split)

or any trial and error variant thereof that I have come up with thus
far. So I'm probably overlooking something obvious syntax-wise here, but
the camel book, perl FAQs (including comp.lang.perl.misc faq) and
rambling around the web have thus far failed to illuminate the darkened
lightbulb over my coding head. :( I also haven't seen any code that does
this per se, but maybe that's because folks out there passing variable
names to split are doing it RIGHT so I just can't see it. ;) 

Any help would be greatly appreciated. It's the last thing I need to do
to really consider this program complete -- for now. ;)

Thanks!
Holly <you know what to remove to email me>


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

Date: Sat, 2 Aug 1997 09:44:42 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Darren Hayes <darrenh@efn.org>
Subject: Re: A simple form mail script
Message-Id: <Pine.GSO.3.96.970802094418.26291H-100000@kelly.teleport.com>

On Sat, 2 Aug 1997, Darren Hayes wrote:

> all I get is the standard generic Server Error message. 

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

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

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



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

Date: 3 Aug 1997 17:50:11 GMT
From: dimrub@nsof.co.il (Rubinstein Dmitry)
Subject: Re: Agent that traces the URLs the user looks at
Message-Id: <5s2gcj$19c$1@lnews.actcom.co.il>

Calle ]sman (md4calle@md.chalmers.se) wrote:
: Hi, I wonder if someone know of any modules that can trace what the user 
: looks at.
: E.g. the user starts some program before he starts browsing with netscape
: and that program will dump all the URLs to the disc.
: Does it exist? Does anyone have an idea how it can be done?

You can decode the history.db file, that Netscape keeps.
It's usually in the ~/.netscape directory (assuming UNIX, ofcourse).
There is an example of how to do this in DB_File(3). Yes, I think
it's there.

: all best,

: /Calle



--
Dmitry Rubinstein
dimrub@math.tau.ac.il
http://www.math.tau.ac.il/~dimrub


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

Date: Sun, 03 Aug 1997 14:31:19 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Agent that traces the URLs the user looks at
Message-Id: <33e769b8.2490821@news.enterprise.net>

md4calle@md.chalmers.se (Calle ]sman) wrote:

>Hi, I wonder if someone know of any modules that can trace what the user 
>looks at.
>E.g. the user starts some program before he starts browsing with netscape
>and that program will dump all the URLs to the disc.
>Does it exist? Does anyone have an idea how it can be done?
Write your own proxy server to put all requests through.
or Examine the history file.

But this shouldn't be in c.l.p.m

-- 
Matthew Burnham, Manager, MindWeb | danew@enterprise.net
Commercial web design and hosting, reasonable rates
UKP24/Mb/Year for DIY space | mindweb@pobox.co.uk
FTP, CGI, password protection, etc. too!
http://www.mindweb.co.uk/


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

Date: Wed, 30 Jul 1997 15:51:42 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
Subject: Re: Any nice "Powered by Perl" gifs?
Message-Id: <33DF54FE.3ECE810A@adc.metrica.co.uk>

nospam@domain.com wrote:

> Has anyone ever seen any nice "Powered by Perl" gifs?
>
> (Maybe with a really muscular-looking camel...)
> --
> ##--------------------------------
> ##  J o h n   N o l a n
> ##  jpn acm org
> ##--------------------------------

It would probably be worth asking this on the
'comp.infosystems.www.authoring.cgi' newsgroup as well.

Simon



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

Date: Sat, 2 Aug 1997 10:01:29 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Parillo <lparillo@newshost.li.net>
Subject: Re: Appending Arrays
Message-Id: <Pine.GSO.3.96.970802095953.26291K-100000@kelly.teleport.com>

On 2 Aug 1997, Parillo wrote:

> Tom Phoenix (rootbeer@teleport.com) wrote:
> 
> : But it's more likely that there's something different happening. Can you
> : step through your script with the debugger and see what's happening? The x
> : command will let you examine an array in a nice format:
> 
> :     x \@array

> I cannot find x in perlop or perlfunc

This x command is part of the debugger. If you can't find it in
perldebug(1), you may have an older version of the debugger (and Perl). 
Hope this helps! 

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



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

Date: 2 Aug 1997 20:29:18 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Appending Arrays
Message-Id: <5s05au$lm2@lyra.csx.cam.ac.uk>

Parillo <lparillo@newshost.li.net> wrote:
>I cannot find x in perlop or perlfunc

Tom was referring to the debugger "x" command.   See the perldebug man page.


Mike Guy


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

Date: Sat, 2 Aug 1997 08:29:55 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Appending Arrays
Message-Id: <jocvr5.6t.ln@localhost>

Parillo (lparillo@newshost.li.net) wrote:
: I cannot find x in perlop or perlfunc


Since Tom was speaking of printing the array in the debugger,
I think you might want to have a look at the perldebug man page.


There _is_ a description of 'x' in perlop, but it is a different 'x'  ;-)

-------------------
Binary "x" is the repetition operator.  In a scalar context, it
returns a string consisting of the left operand repeated the number of
times specified by the right operand.  In a list context, if the left
operand is a list in parentheses, it repeats the list.
-------------------


: lparillo at suffolk dot lib dot ny dot us

: Tom Phoenix (rootbeer@teleport.com) wrote:

: : But it's more likely that there's something different happening. Can you
: : step through your script with the debugger and see what's happening? The x
                             ^^^^^^^^^^^^^^^^^
: : command will let you examine an array in a nice format:

: :     x \@array


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 3 Aug 1997 13:52:00 GMT
From: jahwan@supernova.math.lsa.umich.edu (Jahwan Kim)
Subject: Re: ARRGH!  This class has no class
Message-Id: <slrn5u9380.6p4.jahwan@supernova.math.lsa.umich.edu>

To: adrianh@pobox.co.uk
Subject: Re: ARRGH!  This class has no class
In-Reply-To: <33E20BA5.A2CCFB07@pobox.co.uk>

In article <33E20BA5.A2CCFB07@pobox.co.uk>, you wrote:
[snip]
> #!/usr/bin/perl -w
> 
> package test;
> use FileHandle;
> 
> sub new($$)
> {
>   my $type = shift;
>   my $fileName = shift;
>   my $self = [];
>   $self[0] = new FileHandle;
>   $self[0]->open("<".$fileName) or die("Cannot open \"$fileName\"");

    The above two lines are wrong.  Replace $self[0] by $self->[0] in both
lines.

[snip]

Jahwan


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

Date: Sun, 03 Aug 1997 04:43:23 GMT
From: FIGHT-SPAMjkugler@inreach.com (Joshua J. Kugler)
Subject: Re: breaking a string into 80 chars
Message-Id: <33e40c19.28077110@news.inreach.com>

()I have 2 arrays, @IN and @OUT,  and each element is a single word.
I want
()to print this out, comma delimited, and with the lines being broken
after
()a word and less than 80 characters.  Printing it out as one big line
is
()easy using join ", ", @IN.  I am sure I could figure out some big
()complicated algorithm that could do this, but is there an easy way.


Look in the CPAN archives for the Text::* modules.  The Text::Wrap
module does exactly what you are looking for.  I think it splits at 72
characters or so.

j----- k-----

Please reply via e-mail as well.

Joshua J. Kugler
Computer Consultant--Web Developer
Real e-mail address spelled out to prevent spam. jkugler at inreach dot com
http://www.cwebpages.com/jkugler
Every knee shall bow, and every tongue confess, in heaven, on earth, and under the earth, that Jesus Christ is LORD -- Count on it!
- - - - -
To reply via e-mail, please remove 'FIGHT-SPAM' from my e-mail address. Thanks.


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

Date: Sat, 02 Aug 1997 15:36:29 +0000
From: Jebeze Alexander <bez@interlook.com>
Subject: Carriage Return Problem
Message-Id: <33E353FB.3A4F@interlook.com>

Has anyone experienced this problem?

I have a couple of CGI scripts.  The first script parses a form that
uses mostly <TEXTAREA> form elements and saves it into a number of
files.  The second script allows users to select information to view.

The users who have posted have hit the carriage return extensively in
their postings.  I did not anticipate this yet never expected it to be a
problem.  However, it is. Some really funky stuff is happening when
users try to view submissions that have any carriage returns in them.
Specifically, each additional paragraph is bold faced and seems as
though it were a separate entry (separated by three blank entries).
Weird city!

Any insight that you folks can provide would be very much (HELP!)

A little bit of background.

1) I use cgi-lib.pl to parse the form


2)Here is the code that explicitly saves the info.

open (QUEST1, ">>$in{'day'}1.txt");
print QUEST1 "$in{'name'}::$in{'1'}\n";
close (QUEST1);


3)Here is the code that reads the info

while (<FILE>) {
        ($filename,$filetext) = split (/::/,$_);
        print "<B>$filename</B><P>\n";
        print "$filetext<P><HR><P>\n";
}

4)Solutions that I have tried.

a)Apparently, any entry that includes a carriage return is posted as if
it were $filename variable, because when I eliminate this variable from
the read code, it eliminates anything that appears after the first
carriage return.
b)printing without any HTML surrounding the code, produces the same
result
c)not splitting the entries is completely effective, however the result
is the same as just opening the database and reading the entries
directly, not exactly a desirable for usersd)searching the entries for
carriage returns (\r) and new line characters (\n).  This condenses the
amount of line space between funky
stuff.


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

Date: Sun, 03 Aug 1997 12:55:47 -0700
From: Mark and Esmeralda Lybrand <maryesme@3-cities.com>
Subject: Re: CGI and foreign languages??
Message-Id: <33E4E242.3B9F@3-cities.com>

> which is in four languages. Can anyone tell me whether it is possible
> to get perl to deal with the accented charaters used in German, French
> and Spanish? I would greatly appreciate it.


I was just reading an article out of MultiLingual Communications &
Technology about MIME, Internet Mail and CJK.  It mostly dealt with
email, but it should, at least, explain your problem.

It appears that standard ASCII only uses 7 bits while the extended uses
all 8 of the byte.  Many apps trim the eighth bit.  The solution for
email was to watch the header info being sent.  The typical header that
causes the eight to be trimmed is:

MIME-version: 1.0
Content-type: text/plain;
charset="us-ascii"
Content-transfer-encoding: 7BIT

For email, you should make sure that this is:

MIME-version: 1.0
Content-type: text/plain;
charset="iso-8859-1" (Latin-1)
Content-transfer-encoding: quoted-printable

I often make scripts that require input/output to be in both Spanish and
English.  I have not yet come across the bit trimming problem. I have
noticed it in DOS text stuff, though.

I don't know that this header info will help you much with your database
app, but maybe it will give you a clue of the right question to ask.

If you need any other help, feel free to email

maryesem@3-cities.com

Mark :)


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

Date: 3 Aug 1997 14:24:09 GMT
From: burt@ici.net (Burt Lewis)
Subject: Re: CGI Script that searches a web sites
Message-Id: <5s24a9$34r$1@bashir.ici.net>

Fire up your favorite Search Engine and search for something like:
perl+archive
perl+example
perl+"free scripts"
perl+info
perl+download

If you have no luck this way, let me know.

Burt Lewis
burt@ici.net

In article <01bc9c5d$a9e3c720$2956dacd@admin>, cybrghst@mail.tir.com says...
>
>Hi,
>
>Can anyone point me to a CGI script that will search a personal
>web site and return the results.
>thanx
>--dusty
>



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

Date: Sat, 02 Aug 1997 13:11:04 -0400
From: Doug MacEachern <dougm@osf.org>
To: epeschko@tci.com
Subject: Re: CGI.pm and embedded perl
Message-Id: <33E36A28.584B@osf.org>

epeschko@elmer.tci.com wrote:
> 
> hey all --
> 
> I'm writing a book on perl, and wanted to include a couple of examples on
> code written with an interpreter embedded into the www server to speed
> up load times. (for example, Apache with mod_perl, which should shortly
> work both on Unix and NT)
> 
> I haven't done such a thing ( yet ), and wanted to get some pointers for
> good examples on how to use mod_perl with CGI.pm (if it is in fact
> possible.) Doctor Stein is, unfortunately, in china at the moment. :-(

Look in CGI.pm-x.xx/examples, most if not all of them should work under 
mod_perl/Apache::Registry as they do under CGI (just way faster :-).  If 
there happens to be one that doesn't work, fixing will just be a matter of 
reseting globals, nothing 'use strict' and -w can't cure.  If you want 
examples of tapping into the Apache API with mod_perl, have at look at 
http://perl.apache.org/

Useful documents: cgi_to_mod_perl.pod, mod_perl.pod, Apache.pm's pod, 
apache-modlist.html and extras outside of the distribution are at 
http://perl.apache.org/src/contrib/ 

You'll also find pointers to the FAQ in mod_perl.pod and the README.

-Doug


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

Date: Fri, 01 Aug 1997 08:56:43 GMT
From: Steve_Kilbane@cegelecproj.co.uk
Subject: Re: comments in regular expressions (wish list)
Message-Id: <817cd$8382b.49@news.cegelecproj.co.uk>

In article <33E10BC1.212A9324@hekimian.com>, Joe Buehler <jbuehler@hekimian.com> writes:
> Along this line, it would be nice to be able to be able to
> stuff the matching portions of a pattern into named variables:

my ($var1, $var2) = ($x =~ /\s*(\w+)\s+(\d+)/);
-- 
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.



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

Date: Fri, 01 Aug 1997 15:03:29 +0200
From: Kaare Rasmussen <kar@webline.dk>
Subject: Conversion of Word Processing files
Message-Id: <33E1DEA1.F9EE60D6@webline.dk>

The subject has been mentioned before, but I've never seen a proper
answer.

Is it possible to convert mainstream WP files (Word, WordPerfect, from
different versions) between each other and to ASCII, tex, whatever?


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

Date: 3 Aug 1997 07:42:19 GMT
From: preed@psd.k12.co.us (J. Paul Reed)
Subject: Re: Date::Manip Error
Message-Id: <5s1cor$v3o$1@mercury.psd.k12.co.us>

Zenin (zenin@best.com) wrote:
: 	If you still feel like you must change the names for whatever
: 	reason, then you must also run these commands from root to let perl
: 	know were to find them:
: 		mv /usr/lib/libc.a /usr/lib/libTryToFindMeNowHaHaHa.a
: 		mv /usr/lib/libc.so.* /usr/lib/libFindMeToHaHaHaHaHa.so

And while I'm at it, why I just do a 'rm -rf /'? That would take care of
the problem entirely...

: 	Anyone know if those Darwin awards are still going on? :)

I don't understand why everyone thinks this was a particularly dumb
question; it made the module break, it didn't kill anyone... 

If I rename/move a module and then call it in the new name/localtion, why
shouldn't it work? (That's a rhetorical question; feel free to give
rhetorical answers...)

And, FYI, I was able to get the module working again w/o re-installing
it...

Later,
Paul
   -------------------------------------------------------------------
   J. Paul Reed                 preed@psd.k12.co.us || paul@619pro.com
   Such a noble creature; a quality we sometimes lack...
   				--Borg Queen; Star Trek: First Contact
   Geek Code and various other frivolities at www.psd.k12.co.us/~preed


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

Date: Fri, 1 Aug 1997 20:43:16 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Evaluating Strings
Message-Id: <kb3ur5.9e5.ln@localhost>


comp.lang.perl is a non-newsgroup.

It does not exist.

It is not there (it is only there on poorly administered sites).

Even more telling, nobody who is likely to answer perl questions
even reads it because... well because it is not a newsgroup.

Please do not post there anymore...



Kapil Raina (kraina@geocities.com) wrote:
: Try this...

: $lcuser = "Frank";
: print "x=search.pl?user=$lcuser";

: The print statement will evaluate all "$" variables automatically.  Also
                           ^^^^^^^^

The correct term is "interpolate".

"evaluate" means something else (see eval() in perlfunc)


: keep in mind that in your code below you used '' single quotes around
: Frank 

Which is perfectly OK, because there is nothing in 'Frank' to
interpolate...


: and that has different meaning than "" double quotes in Perl. 
: Look up which used for what, but in this case I think you wanted ""
: around Frank.


I don't think the quotes around Frank have anything to do with it.


: Hope that helps. 

Thanks for trying though.


: Chris Bradley wrote:
: > 
: > I am trying to evaluate a string that contains a variable. For example:
: > 
: > $lcuser = 'Frank';
: > $x = "search.pl?user=$lcuser";
: > print "x=" . $x;
: > 
: > I want the output to be: x=search.pl?user=Frank
: > 
: > I have tried using the eval($x) function, but it was returning a empty
: > string.
: > 
: > Any help is greatly appreciated, please reply to me privately and to the
: > group.
: > 
: > thanks

--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Sun, 03 Aug 1997 01:21:44 -0400
From: BetaMan <BetaMan>
Subject: Re: free perl interpreter
Message-Id: <33E41568.2C55@ibm.net>

Tom Phoenix wrote:
> 
> On Sat, 2 Aug 1997, Ekim E. YARDIMLI wrote:
> 
> > i've just started learning perl and currently i'm not being ablo to test
> > what i write, i plan to get a virtual web host that does support perl,
> > but until then i was wondering if there exists a free server where
> > people can run their scripts?
> 
> You don't have to have a server to run a script. If you write your scripts
> with CGI.pm it's easy to test them from the command line. The docs for
> CGI.pm explain how. Hope this helps!
> 
> --
> Tom Phoenix           http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
> Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/

There are two flavors of a free w95 server @:

http://www.fas.harvard.edu/~glau/httpd/

If using Warp, I think GoServe and required parts are available free
also.

I installed one on my machine as a local, it helps simulation along. I
only wish learning Perl was as easy as that ;-)

 
-- 
=======================================
Regardless of what the header shows 
replace 7 with seven in 7seas@ibm.net
=======================================


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

Date: 2 Aug 1997 23:05:35 GMT
From: burt@ici.net (Burt Lewis)
Subject: Re: Getting variables from checkboxes???
Message-Id: <5s0efv$lfo$1@bashir.ici.net>

I'm all set with this - thanks for everyones help.

Great group!

In article <5rqcbs$bfu$1@bashir.ici.net>, Burtlewis@ici.net says...
>
>I have a script that reads from a variable length text file and outputs an 
>HTML table based on the records in the file.  That works fine!
>
>I also include a checkbox for each line which I name in increments.
>(del1,del2,del3,etc.)
>
>Problem is that I'm not sure how I can capture these variables not knowing 
>how many lines I will have to be read. I can't get the foreach looping.
>



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

Date: 2 Aug 1997 22:05:46 GMT
From: "Dave Roth" <rothd@roth.netX>
Subject: Re: Help! Win32::ODBC *and* GD working at once?
Message-Id: <01bc9f90$3f63e6b0$11906ec6@main2>

Win32::ODBC and Win32::GD both do work together in the Activeware port. If
you are getting parse exceptions then you need to download the replacment
for ODBC.pll and/or GD.pll.
Parse exceptions occur when the build of the extension (eg. odbc or gd)
does not match the build of perl.
Activeware builds 304-307 (we are currently at 307) are all compatible.

I have not recompiled any binaries for the core distribution yet -- it will
probably be a little while until I do. I need to convert them to XS first.
dave

-- 
================================================================
Dave Roth                               ...glittering prizes and
Roth Consulting                     endless compromises, shatter
rothd@roth.net                         the illusion of integrity

 My email address is disguised to fool automailers. Remove the
                 trailing 'X' 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.


Mr R Hamilton <csrax@csv.warwick.ac.uk> wrote in article
<5rseea$cpe@crocus.csv.warwick.ac.uk>...
> 
> After endless "parse error"s trying to get GD to work with NT Perl
> 5.003 (build 307), I've gone to Gurusamy Sarathy's 5.004 build, but I
> can't get that to work with Win32::ODBC (Dr Watson kicks in with "an
> application error has occurred ... access violation ..."). Has anyone
> out there got this combination working and can give me some tips?
> 
> Thanks,
> Ross
> 
> .-------Ross Hamilton, PhD Student in the History of Computing-------.
> | http://www.dcs.warwick.ac.uk/~ross | mailto:ross@dcs.warwick.ac.uk |
> |    Department of Computer Science, | 12 Newbold Place, Leamington  |
> | Uni. of Warwick, Coventry, CV4 7AL | Spa, Warwks, CV32 4HR, UK     |
> `-------------- Office: 01203 528043 | Home: 01926 886146 -----------'
> 


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

Date: 3 Aug 1997 06:07:49 GMT
From: altfnine@aol.com (Altfnine)
Subject: Help..
Message-Id: <19970803060700.CAA21795@ladder02.news.aol.com>

Here is a part of my script but for some reason this is not doing what it
is suppose . Every thing else is working fine.

open(MAIL,"|$mailprog -t -oi") || die $!;

         print MAIL "To: $res\n";
         print MAIL "From: $email ($first_name $last_name)\n";
         print MAIL "Subject: $ab\n";
         print MAIL "X-Courtesy-Of: XXXXXXXXX\n\n";
         
         open (ELOG, "/x/x/x/$name\.txt") || die $!;
         while (<ELOG>) { 
  print MAIL; print MAIL"\n"; } close (ELOG);
 print MAIL "";
      }

Can some one tell me why this is not working..

Thank You.


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

Date: Sun, 3 Aug 1997 22:59:36 LOCAL
From: Bruce@winzurf.co.nz (Bruce Spedding)
Subject: how do I get rid of line feeds from string?
Message-Id: <Bruce.605.01B4AA5A@winzurf.co.nz>

I need to filter out LFs (0A hex) from a string
I'd appreciate some suggestions
regards
Bruce



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

Date: Sun, 3 Aug 1997 12:54:36 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: how do I get rid of line feeds from string?
Message-Id: <ebohlmanEEC970.ILL@netcom.com>

Bruce Spedding (Bruce@winzurf.co.nz) wrote:
: I need to filter out LFs (0A hex) from a string
: I'd appreciate some suggestions

Take a look at the entries for tr and s in perlfunc.



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

Date: Sat, 2 Aug 1997 09:59:35 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Thomas Wernitz <thomas_wernitz@tait.co.nz>
Subject: Re: How to compare references?
Message-Id: <Pine.GSO.3.96.970802095401.26291J-100000@kelly.teleport.com>

On 31 Jul 1997, Thomas Wernitz wrote:

> does anybody know how to compare to references? I don't want to compare
> the stuff they are referencing, but if they reference the same object. 
> Both operators 'eq' and '==' seem to do the trick, that makes it
> suspicious!

The both work; if you use a reference as a number you (currently) get the
numeric address, so that something like SCALAR(0xae744) becomes 714564,
since 714564 is 0xae744. But I'd prefer the string comparison because
that's less likely to make a false positive if you accidentally compare a
non-reference to a reference. (That is, though it's unlikely, you might
happen to have a scalar with the value 714564. But it's even less likely
that you'll have one which is "SCALAR(0xae744)".) 

Of course, if there's any chance of that, you should make sure you
actually _have_ references. (Watch out for undef!)

      if (ref($foo) and ref($bar) and $foo eq $bar) { ... }

Hope this helps!

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



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

Date: Sat, 2 Aug 1997 09:01:28 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: y0h8797@acs.tamu.edu
Subject: Re: How to make a username/password entry box?
Message-Id: <Pine.GSO.3.96.970802085952.26291B-100000@kelly.teleport.com>

On 2 Aug 1997 y0h8797@acs.tamu.edu wrote:

> There're many sites that prompt for username/password. 

Usually this is done as a feature of the server. If you check your
server's docs, a server newsgroup, or that newsgroup's FAQ, you should
find a way to do it. Look for '.htaccess'. Hope this helps!

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



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

Date: Sat, 2 Aug 1997 09:03:38 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: jin lu <jlu01@emory.edu>
Subject: Re: howto import other perl file into current one??
Message-Id: <Pine.GSO.3.96.970802090246.26291C-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, jin lu wrote:

> message is : "test.pl did not return a true value at new.pl line 2." 

perldiag says:

    =item %s did not return a true value

    (F) A required (or used) file must return a true value to indicate
    that it compiled correctly and ran its initialization code correctly. 
    It's traditional to end such a file with a "1;", though any true value
    would do.  See L<perlfunc/require>. 

Hope this helps!

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



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

Date: Sun, 03 Aug 1997 15:51:04 +0200
From: Enrico Badella <softstar@pol88a.polito.it>
Subject: Linking regcmp in XS module on HP-UX
Message-Id: <33E48CC8.869@pol88a.polito.it>

Hello perl gurus,

While porting an XS module, that uses regcmp and regex, from Solaris
to HP-UX 10.x I ran into this problem. HP distributes a non PIC libPW
library so the linkage of my stuff fails. 

Any suggestions? I really wouldn't want to use a regxx replacement
just to port to HP-UX.

Thanks in advance
eb


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

Date: Sun, 03 Aug 1997 06:46:33 +0300
From: Themis Anthopoulos <tant@topo.auth.gr>
Subject: linux perl script, modified for NT
Message-Id: <33E3FF19.6409@topo.auth.gr>

I have a guestbook writen in perl, but the script is writen for unix.
The guestbbok works, but it does not appears the date and the time that
someone signed it, because the script reffers to /usr/bin directory for
the date_command, and as you know, there is no such directory in windows
NT (4.0) workstation. Does anyone knows if and how I can modify the
script to appear the date and the exact time that someone signed my
guestbook?


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

Date: 2 Aug 1997 22:43:48 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: linux perl script, modified for NT
Message-Id: <5s15qk$rat$1@shell3.ba.best.com>

In article <33E3FF19.6409@topo.auth.gr>,
Themis Anthopoulos  <tant@topo.auth.gr> wrote:
>someone signed it, because the script reffers to /usr/bin directory for
>the date_command, and as you know, there is no such directory in windows

There's no need to use an external program to get the date. Try this:

	$date = scalar(localtime);

/MC
-- 
Matthew Cravit, N9VWG               | Experience is what allows you to
E-mail: mcravit@best.com (home)     | recognize a mistake the second
        mcravit@taos.com (work)     | time you make it.


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

Date: Sun, 03 Aug 1997 07:09:54 -0700
From: "Stephen T. Cerniglia" <deputy-_-dawg@msn.com>
Subject: Looking for good perl...
Message-Id: <01bca017$97035040$43c82399@default>

To whom reads,
I am looking for a perl script or pieces of a script that will allow me to
access a ftp server off my server and get the information of the Direcotry
tree and file listings...  No this is not a hacking thing...  I am trying
to create a search utility that will go on the servers and allow people to
look for a file...  If there are such scripts out please email me at
Stephon@hempseed.com or Deputy-_-Dawg@msn.com!  Thanks for your help!!!

More info:
If there is already a script create and you wish to help me out...  The
script has to do the following:
-Access different FTP servers
-Get the directory tree and file listings of specified extention
-Write the information on a database (simply a text file) on to my server
-Search through the database that's on my server
-Display the file name (not direcotry source) with the <A HREF=""> </A>
linking the file to main server
-Able to enter password and free access name to obtain access to server
-For more details email me!


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

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

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