[19037] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1232 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 2 21:05:51 2001

Date: Mon, 2 Jul 2001 18:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <994122309-v10-i1232@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 2 Jul 2001     Volume: 10 Number: 1232

Today's topics:
    Re: arrays in XS... <Juha.Laiho@iki.fi>
        Caching <ted_godwin@mindspring.com>
    Re: Comparing strings in Perl ctcgag@hotmail.com
    Re: Comparing strings in Perl <jurgenex@hotmail.com>
    Re: Cryptographic Service Provider für Chipkarten? <iltzu@sci.invalid>
        European Yet Another Perl Conference (Jan-Pieter Cornet)
        Getting list of NASDAQ Stock Symbols? (eT)
    Re: Getting list of NASDAQ Stock Symbols? <mbudash@sonic.net>
        Havin' some trouble with sockets... (Chad)
    Re: Havin' some trouble with sockets... (Brian Pontz)
    Re: How can I test that a subroutine exists? <abrice2@home.com>
        HTML::Parser (I need Help!!! Please) <irl.com@ntlworld.com>
        HTTP::Request, malformed header error (Ray Trace)
    Re: HTTP::Request, malformed header error (Charles DeRykus)
        internationalization in perl <ramu_tubati@hotmail.com>
    Re: Lincoln D. Stein's HTTPD user manage script (Gururaj Upadhye)
        Merging content from two templates (=?ISO-8859-1?Q?Morten_Tanger=E5s?=)
    Re: Merging content from two templates <mbudash@sonic.net>
    Re: Merging content from two templates (Tad McClellan)
    Re: Merging content from two templates <krahnj@acm.org>
    Re: Merging content from two templates (=?ISO-8859-1?Q?Morten_Tanger=E5s?=)
    Re: Need a start or direction for PERL Program (SMS Bul (SoftwareSleuth)
    Re: New babies to Perl - FREE Documentation Require pawinan@ilstu.edu
        Newbie-best way to store querystrings values in variabl <flag@como.com>
    Re: Newbie-best way to store querystrings values in var <wyzelli@yahoo.com>
        PHP <sebastijan.vacun@uni-mb.si>
        Problem installing DBD/Oracle interface? <bill_border@agilent.com>
    Re: Query:  PERL v.s. Perl ==>  What's the difference?? (codeslayer)
        ref($val) not returning anything? (Mike Eggleston)
    Re: ref($val) not returning anything? (Damian Conway)
    Re: ref($val) not returning anything? <mjcarman@home.com>
    Re: Settings locale failed (les ander)
        Using DBI with PlRPC <abaugher@esc.pike.il.us>
        Vapo-Rub <anonymous@anonymous.anonymous>
    Re: Vapo-Rub <iltzu@sci.invalid>
        Website uses frames to call perl scripts -- must I use  (Carolyn Jean Fairman)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 2 Jul 2001 16:28:27 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: arrays in XS...
Message-Id: <9hq7fb$q4o$1@ichaos.ichaos-int>

Jim Lewis <jrl@ast.cam.ac.uk> said:
>a C subroutine...
>
>extern int aaa(char *a[]) {
>.
>.
>.
>}
>
>How do I write the interface .xs routine so that I can call this from
>perl using:
>
>$returnval = &aaa(\@array);

Sorry, no real code, but a thought. I hope someone else corrects, if there's
a better way.

In the C part of the XS,
- start by finding out the array size with av_len()
- allocate enough memory for the "index" of the C char **
- loop through the (Perl) array indices and fetch the element values
  with av_fetch(), filling the above created char ** as you go
- call the C function

See "perldoc perlapi" for details of the above (and other) functions.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ UH++++ UL++++$ P++@ L+++ E(-) W+$@ N++ !K w !O
         !M V PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h--- r+++ y+++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: Mon, 2 Jul 2001 20:56:16 -0400
From: "TedWeb" <ted_godwin@mindspring.com>
Subject: Caching
Message-Id: <9hr5ao$ei4$1@slb7.atl.mindspring.net>

Is it possible to disable client side caching with Perl?

Thanks,
TedWeb




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

Date: 02 Jul 2001 18:14:52 GMT
From: ctcgag@hotmail.com
Subject: Re: Comparing strings in Perl
Message-Id: <20010702141452.409$wA@newsreader.com>

Ren Maddox <ren@tivoli.com> wrote:
> On Mon, 02 Jul 2001, joachim.rose@psi.ch wrote:
> > Example:
> >
> > $a = '[]';
> > $b = 'ABC[]';
> >
> > if ($b =~ /$a/) {
> >       print "$a is a substring of $b";
> > }
>
> if (index($b, $a)) {
>     print "$a is a substring of $b\n";
> }

I think you mean:

if (index($b,$a) != -1 ) {

index is a function that doesn't DWIM.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
                    Usenet Newsgroup Service


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

Date: Mon, 2 Jul 2001 15:28:02 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Comparing strings in Perl
Message-Id: <3b40f572$1@news.microsoft.com>

"Joachim Rose" <joachim.rose@psi.ch> wrote in message
news:3B409CE2.F087B165@psi.ch...
> I've got a problem in comparing strings in Perl.
> I must check, if one string($a) is a substring of another string($b).
> These strings can be of any value, they can even appear as regex as
> shown in the example below, but they should be treated just like pure
strings.
[...]
> I was expecting that $a is a substring of $b.
> But it will be compiled as a regex.
> Can anybody tell me how to accomplish to decide, that $a is a substring of
$b ?

'index' does exactly what you are looking for. For details please check
    perldoc -f index

jue




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

Date: 2 Jul 2001 18:23:35 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Cryptographic Service Provider für Chipkarten?
Message-Id: <994098201.12181@itz.pp.sci.fi>

In article <3B4069B7.21C1A007@lmf.ericsson.se>, Deneb Pettersson wrote:
>no shit :)

no context :(


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

Date: 2 Jul 2001 22:24:02 GMT
From: johnpc@xs3.xs4all.nl (Jan-Pieter Cornet)
Subject: European Yet Another Perl Conference
Message-Id: <9hqsa2$fhc$1@news1.xs4all.nl>

This is a joint announcement for the european "YAPC" perl conference, and
the next Amsterdam.pm perl mongers meeting.



                       European Yet Another Perl Conference
                               YAPC::Europe-2.0.01
                           http://www.yapc.org/Europe/

         Thursday-Saturday, August 2-4, 2001 at the Hogeschool Holland,
                           Amsterdam, the Netherlands.

 Yet Another Perl Conference (YAPC) is an inexpensive (99 EURO) conference
 for Perl users and developers.   The programme is a mix of tutorials and
 technical talks, some of which focus on this year's theme, 'Security.'

 Registration is now open at <http://www.yapc.org/Europe/registration.html>!

 We encourage you to register early as there is limited space.  People
 registering before 11 July will receive a conference t-shirt.

 For up-to-date information, refer to the web site or join the mailing
 list by sending mail to <majordomo@lists.dircon.co.uk> with
 'subscribe yapc-europe' in the email body.

 A hack session will be held for CPANTS (CPAN Testing Service) several
 days before and after the conference.  For more information subscribe
 to <cpants-devel@lists.sourceforge.net> via
 <http://lists.sourceforge.net/lists/listinfo/cpants-devel>.

 We look forward to seeing you at YAPC::Europe-2.0.01!


Those willing to meet part of the crew of YAPC::Europe-2.0.01 and an
assorted bunch of other perl freaks are welcome to join our monthly
Amsterdam Perl Mongers meeting, this tuesday July 3rd, at the office
of XS4ALL Internet. See http://www.amsterdam.pm.org/ for more details.

-- 
#!perl -pl	# This kenny-filter is virus-free as long as you don't copy it
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):('m',p,f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;				   # Jan-Pieter Cornet


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

Date: 2 Jul 2001 11:48:11 -0700
From: eTdeBruin@yahoo.com (eT)
Subject: Getting list of NASDAQ Stock Symbols?
Message-Id: <cc8228ad.0107021048.bfbeadf@posting.google.com>

I was wondering if a module existed that could download a complete
list of Symbols from nasdaq or so?  I am already using Finance::Quote
but it only does lookups *based* on symbols.

Thanks


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

Date: Mon, 02 Jul 2001 19:22:26 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Getting list of NASDAQ Stock Symbols?
Message-Id: <mbudash-A202EE.12222702072001@news.sonic.net>

In article <cc8228ad.0107021048.bfbeadf@posting.google.com>, 
eTdeBruin@yahoo.com (eT) wrote:

> I was wondering if a module existed that could download a complete
> list of Symbols from nasdaq or so?  I am already using Finance::Quote
> but it only does lookups *based* on symbols.
> 
> Thanks

check out http://www.nasdaq.com/reference/IndexDescriptions.stm
 
hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: 2 Jul 2001 14:04:35 -0700
From: chadc@printelligent.com (Chad)
Subject: Havin' some trouble with sockets...
Message-Id: <2436c063.0107021304.6f889753@posting.google.com>

Hi,
I was having some trouble opening up sockets with perl. I followed
O'Rielly's reference book, but it still has trouble.


#!/usr/bin/perl

use Socket;



$socket = IO::Socket::INET->new("10.0.0.218:518") || die "Couldn't
open printer : $!\n";

error message is :
can't open object method "new" via package "IO::Socket::INET" at line
7.

Thanks for your help,
Chad


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

Date: Mon, 02 Jul 2001 21:20:50 GMT
From: pontz@NO_SPAMchannel1.com (Brian Pontz)
Subject: Re: Havin' some trouble with sockets...
Message-Id: <3b40e547.141461811@news.ne.mediaone.net>

>use Socket;

Should be
use IO::Socket;
with the way your doing it.

Brian


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

Date: Mon, 02 Jul 2001 19:58:39 GMT
From: Aaron Brice <abrice2@home.com>
Subject: Re: How can I test that a subroutine exists?
Message-Id: <3B40D365.7CE30433@home.com>

> Yes, you're missing a closing parenthesis in the "if" line.
> Otherwise the syntax is fine and does what you want.

Thanks.  That was a simplified example that I had typed out but when I looked
at my actual code there was a similar problem..

> With
> your code, one problem is that a data error in an action name can
> result in calling a random subroutine in your program.  That could
> be hard to debug, and it's easy to avoid too.
>

Do you mean that a typo in the action name that called a subroutine that
didn't exist could cause the script to call a random subroutine that did
exist?  Or do you just mean that it's possible to accidently use a different
subroutine that does exist?




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

Date: Tue, 3 Jul 2001 01:19:43 +0100
From: "cubol" <irl.com@ntlworld.com>
Subject: HTML::Parser (I need Help!!! Please)
Message-Id: <Tc807.7373$Ms3.1336149@news6-win.server.ntlworld.com>

Hi,

    I'm presently trying to build a html parser to extract all the textural
info out of html pages, including the textural parts of the html tags.  Such
as the img alt attribute, and the a link attrib.
    I have been told I can do this with HTML::Parser but I really just don't
know how to extract the info I want, [Allow I can extract lots of info a
don't want!! :) ]

Any help would be exellent
Thanks
Cubol....





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

Date: 2 Jul 2001 11:11:57 -0700
From: raytrace007@hotmail.com (Ray Trace)
Subject: HTTP::Request, malformed header error
Message-Id: <2224e6d3.0107021011.26f530ae@posting.google.com>

I'm trying to set up a simple HTTP Request using Perl. I've read
     (numerous times) any online help I could find on setting this up
     properly and I continue to get the following error.

     [Mon Jul 2 13:59:33 2001] [error] [client -IP address here-] malformed
     header from script. Bad header=Wrong.: -Script location here-

     I'm not sure what I'm doing wrong. Here is the perl Script.

     #!/usr/bin/perl
     use HTTP::Request::Common qw(POST);
     use LWP::UserAgent;
     my $ua = new LWP::UserAgent;

     # Create a request
     my $request = new HTTP::Request POST => 'http://-url here-';

     # Pass request to the user agent and get a response back
     my $response = $ua->request($request,
                                     Connection => 'Keep-Alive',
                                     Content-Type => 'text/xml',
                                     Host => '-host here-');

     # Check the outcome of the response
     if ($response->is_success) {
             print $ua->content;
     } else {
             print "Wrong.";
     }



     Any ideas? Thanks in advance for any help
     -Ray-


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

Date: Mon, 2 Jul 2001 19:58:49 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: HTTP::Request, malformed header error
Message-Id: <GFv3I2.MME@news.boeing.com>

In article <2224e6d3.0107021011.26f530ae@posting.google.com>,
Ray Trace <raytrace007@hotmail.com> wrote:
>I'm trying to set up a simple HTTP Request using Perl. I've read
>     (numerous times) any online help I could find on setting this up
>     properly and I continue to get the following error.
>
>     [Mon Jul 2 13:59:33 2001] [error] [client -IP address here-] malformed
>     header from script. Bad header=Wrong.: -Script location here-
>
>     I'm not sure what I'm doing wrong. Here is the perl Script.
>
>     ....
>
>     # Check the outcome of the response
>     if ($response->is_success) {
>             print $ua->content;
                      ^^^^^^^
                   $response->content
>     } else {
>             print "Wrong.";
>             ^^^^^^^^^^^^^ 
              # $response->status_line;    # ??      
              # $response->error_as_HTML;  # ??      
>     }

-- 
Charles DeRykus


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

Date: Mon, 2 Jul 2001 15:21:50 -0400
From: "Ramu Tubati" <ramu_tubati@hotmail.com>
Subject: internationalization in perl
Message-Id: <9hqhkg$48t3@eccws12.dearborn.ford.com>

How do you localize/internationalize sites written in Perl? Is there a
concept of resource bundles?

Thanks,
Tubati.




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

Date: 2 Jul 2001 13:34:00 -0700
From: gururaj@powertec.com (Gururaj Upadhye)
Subject: Re: Lincoln D. Stein's HTTPD user manage script
Message-Id: <23c54ab6.0107021233.79dc8d7@posting.google.com>

gururaj@powertec.com (Gururaj Upadhye) wrote in message news:<23c54ab6.0106281210.6c6e39b3@posting.google.com>...
> I have set this on windows NT, with mod perl. The behaviour is very
> unusual. The first, 3rd, 5th, (odd) access to the script result in
> user name and password prompt page to be displayed. At this point if I
> hit the browser's back button and try again, the operation is
> successful. This has puzzled me a lot and I donot have any solution
> for this. Thanks for your help.
> 
> Thanks and regards,
> -Gururaj.

somebody please help.
Thanks


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

Date: Mon, 2 Jul 2001 23:20:59 +0200
From: morten@tangeraas.com (=?ISO-8859-1?Q?Morten_Tanger=E5s?=)
Subject: Merging content from two templates
Message-Id: <1evxxgn.1nlg6hchiuvwgN%morten@tangeraas.com>

I'm making a product viewing script based on templates, and the output
comes from two templates; one template that contains the layout (html
code), and an other that contains the text.

For those of you who's wondering on why I'm doing it like this, the
reason is that the users of the script will be able to both choose
language (based on different text files), and to choose between
different layouts (based on different html files).

One line in a layout file may look like this:

Hi! My name is (!Name!) and I come from (!Location!)

And a line i a file which contains text, might look like this:

Name=George
Location=Norway


It's actually no problem to replace eg. (!Name!) with the right text
from the text file. In that case, I'm using the following perl code
($line represent each line in the template file):

$line =~s/(\!Name\!)/$CONFIG{'Name'}/gis;
$line =~s/(\!Loaction\!)/$CONFIG{'Loaction'}/gis;

But in this case, it's not this simple anyway. First of all, there are
pretty many different text fields, and the name of the fields are also
different fro template to template.

Therefor, I would like a function that parsed a given layout template,
found all text that started with '(!' and ended with '!)', registred the
text inside the, and replaced it with the equivalent text from
$CONFIG{'*'}.

Are there anyone out there who has any suggestions about how this could
be done?

Thanks!

Morten Tangeraas
Hallingdal WebDesign
Norway 


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

Date: Mon, 02 Jul 2001 21:49:14 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Merging content from two templates
Message-Id: <mbudash-93E1D2.14491402072001@news.sonic.net>

In article <1evxxgn.1nlg6hchiuvwgN%morten@tangeraas.com>, 
morten@tangeraas.com (Morten Tangerås) wrote:

> I'm making a product viewing script based on templates, and the output
> comes from two templates; one template that contains the layout (html
> code), and an other that contains the text.
> 
> For those of you who's wondering on why I'm doing it like this, the
> reason is that the users of the script will be able to both choose
> language (based on different text files), and to choose between
> different layouts (based on different html files).
> 
> One line in a layout file may look like this:
> 
> Hi! My name is (!Name!) and I come from (!Location!)
> 
> And a line i a file which contains text, might look like this:
> 
> Name=George
> Location=Norway
> 
> 
> It's actually no problem to replace eg. (!Name!) with the right text
> from the text file. In that case, I'm using the following perl code
> ($line represent each line in the template file):
> 
> $line =~s/(\!Name\!)/$CONFIG{'Name'}/gis;
> $line =~s/(\!Loaction\!)/$CONFIG{'Loaction'}/gis;
> 
> But in this case, it's not this simple anyway. First of all, there are
> pretty many different text fields, and the name of the fields are also
> different fro template to template.
> 
> Therefor, I would like a function that parsed a given layout template,
> found all text that started with '(!' and ended with '!)', registred the
> text inside the, and replaced it with the equivalent text from
> $CONFIG{'*'}.
> 
> Are there anyone out there who has any suggestions about how this could
> be done?

$line =~ s/\(!(.+?)!\)/$CONFIG{$1}/gis;

the $1 in the replacement portion of the regexp will contain what's 
between the '(!' and the '!)'. type:

perldoc perlre

at the unix command prompt for more info.

hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Mon, 2 Jul 2001 17:18:29 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Merging content from two templates
Message-Id: <slrn9k1p95.6em.tadmc@tadmc26.august.net>

Morten Tangerås <morten@tangeraas.com> wrote:
>I'm making a product viewing script based on templates, and the output
>comes from two templates; one template that contains the layout (html
>code), and an other that contains the text.
>
>For those of you who's wondering on why I'm doing it like this,


There are lots and lots of Templating modules on CPAN. Seems it
would better to just use one of those rather than crafting
yet another template system:

   http://search.cpan.org/search?mode=module&query=template


>One line in a layout file may look like this:
>
>Hi! My name is (!Name!) and I come from (!Location!)
>
>And a line i a file which contains text, might look like this:
>
>Name=George
>Location=Norway
>
>It's actually no problem to replace eg. (!Name!) with the right text
>from the text file. In that case, I'm using the following perl code
>($line represent each line in the template file):
>
>$line =~s/(\!Name\!)/$CONFIG{'Name'}/gis;
            ^     ^                     ^
            ^     ^                     ^

All of those characters have no effect, so they should not be there.

! is not special in regexes.

/s only affects dot, and your pattern has no dot.


parens however _are_ special, but you are not escaping them...


>$line =~s/(\!Loaction\!)/$CONFIG{'Loaction'}/gis;
              ^^^^^^^^             ^^^^^^^^

At least your typos are consistent  :-)


>But in this case, it's not this simple anyway. First of all, there are
>pretty many different text fields, and the name of the fields are also
>different fro template to template.
>
>Therefor, I would like a function that parsed a given layout template,
>found all text that started with '(!' and ended with '!)', registred the
>text inside the, and replaced it with the equivalent text from
>$CONFIG{'*'}.
>
>Are there anyone out there who has any suggestions about how this could
>be done?


   # untested
   my $keys = join '|', keys %CONFIG;
   s/\(!($keys)!\)/$CONFIG{$1}/g;

or maybe:

   s/\(!(\w+)!\)/exists $CONFIG{$1} ? $CONFIG{$1} : "(!$1!)"/ge;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 02 Jul 2001 22:18:08 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Merging content from two templates
Message-Id: <3B40F32C.CD1C144F@acm.org>

Morten Tangerås wrote:
> 
> I'm making a product viewing script based on templates, and the output
> comes from two templates; one template that contains the layout (html
> code), and an other that contains the text.
> 
> For those of you who's wondering on why I'm doing it like this, the
> reason is that the users of the script will be able to both choose
> language (based on different text files), and to choose between
> different layouts (based on different html files).
> 
> One line in a layout file may look like this:
> 
> Hi! My name is (!Name!) and I come from (!Location!)
> 
> And a line i a file which contains text, might look like this:
> 
> Name=George
> Location=Norway
> 
> It's actually no problem to replace eg. (!Name!) with the right text
> from the text file. In that case, I'm using the following perl code
> ($line represent each line in the template file):
> 
> $line =~s/(\!Name\!)/$CONFIG{'Name'}/gis;
> $line =~s/(\!Loaction\!)/$CONFIG{'Loaction'}/gis;
> 
> But in this case, it's not this simple anyway. First of all, there are
> pretty many different text fields, and the name of the fields are also
> different fro template to template.
> 
> Therefor, I would like a function that parsed a given layout template,
> found all text that started with '(!' and ended with '!)', registred the
> text inside the, and replaced it with the equivalent text from
> $CONFIG{'*'}.
> 
> Are there anyone out there who has any suggestions about how this could
> be done?


$line =~s/!(\w+)!/$CONFIG{$1}/gi;



John
-- 
use Perl;
program
fulfillment


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

Date: Tue, 3 Jul 2001 00:53:36 +0200
From: morten@tangeraas.com (=?ISO-8859-1?Q?Morten_Tanger=E5s?=)
Subject: Re: Merging content from two templates
Message-Id: <1evy2et.1cmpsmf1hmkdceN%morten@tangeraas.com>

Thanks to all of you for good and fast answers! I found a sollution that
seems to work pretty good!

Instead of using (!!), I changed it to <%%>

Morten


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

Date: 2 Jul 2001 13:38:28 -0700
From: howhow82@hotmail.com (SoftwareSleuth)
Subject: Re: Need a start or direction for PERL Program (SMS Bulk Message)
Message-Id: <8048c9d1.0107021238.3ee2cf0@posting.google.com>

Ever tried Simplewire? I hear they are pretty good for making
applications to send SMS. http://developers.simplewire.com

leeassoc@hotmail.com (Vlad) wrote in message news:<5bd5b7e0.0106301700.342b4729@posting.google.com>...
> I have seen, know how it works via sendmail or perl script to send SMS
> messages to cell phones.
> 
> There is also clickatel.com to send message for 8.50$ for 250 of them
> and the more you go the cheaper it is.
> 
> I would like to read about it or buy a book but I am not sure if the
> stuff is in there....
> 
> Anyone tried it might know about, or where to start...
> 
> Thanks..
> 
> leeassoc@hotmail.com


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

Date: 2 Jul 2001 18:51:31 GMT
From: pawinan@ilstu.edu
Subject: Re: New babies to Perl - FREE Documentation Require
Message-Id: <9hqfrj$9sp$1@news.ilstu.edu>

Kelvin Wong <kvwong@singnet.com.sg> wrote:
> I'm a new babies in Perl Programming and does anyone know where can i get
> the FREE documentation of learning Perl Programming?

> Any suggested URL?

Go to www.google.com and search for "perl tutorial".

The first link, http://www.comp.leeds.ac.uk/Perl/start.html, looks like a
good place to start.

Oh, and here's a page with a whole lot more tutorials: 
http://bookmarks.cpan.org/search.cgi?cat=training%2ftutorials

As another poster mentioned, "perldoc" will provide you with a complete
reference of the language.  Though if you know nothing or very little about 
the language, it is not a suitable starting point.

Phil


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

Date: Mon, 02 Jul 2001 23:31:07 GMT
From: "Flag FComo" <flag@como.com>
Subject: Newbie-best way to store querystrings values in variables.??
Message-Id: <%u707.62406$6d.871293@news.easynews.com>

Sorry about this question, I'm new to cgi., I come from .asp

I have want to go to a cgi file with querystrings:

http://www.domain.com/cgi-bin/file.cgi?user=user&pass=pass&email=email

Which would be the best way to store this information in variables
$user
$pass
$email

thanks in advance for any help




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

Date: Tue, 3 Jul 2001 09:58:53 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Newbie-best way to store querystrings values in variables.??
Message-Id: <Ig807.20$1B2.655@vic.nntp.telstra.net>

"Flag FComo" <flag@como.com> wrote in message
news:%u707.62406$6d.871293@news.easynews.com...
> Sorry about this question, I'm new to cgi., I come from .asp
>
> I have want to go to a cgi file with querystrings:
>
> http://www.domain.com/cgi-bin/file.cgi?user=user&pass=pass&email=email
>
> Which would be the best way to store this information in variables
> $user
> $pass
> $email
>
> thanks in advance for any help

#!/usr/local/bin/perl -w
use strict;
use CGI;

my $q = CGI-> new;

my $user = $q->param('user');
my $pass = $q->param('pass');

etc etc

type perldoc CGI at your command prompt for more documentation, or if using
Activestate's Perl, use the html documentation supplied.

Wyzelli
--
push@x,$_ for(a..z);push@x,' ';
@z='092018192600131419070417261504171126070002100417'=~/(..)/g;
foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;




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

Date: Tue, 3 Jul 2001 01:39:44 +0200
From: "Sebastijan Vacun" <sebastijan.vacun@uni-mb.si>
Subject: PHP
Message-Id: <9hr11a$air$1@strelovod.uni-mb.si>

I wonder, how in PHP get n-th character from string

 on my computer (PHP4) works:
 $tmp="string";
 echo $tmp{0};

 but when i put this on server, doesn't work.

 bye, sebastijan

p.s.: server conf is:
Apache/1.3.14 (Unix) PHP/4.0.3pl1 PHP/3.0.17






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

Date: Mon, 2 Jul 2001 13:20:40 -0600
From: "Bill Border" <bill_border@agilent.com>
Subject: Problem installing DBD/Oracle interface?
Message-Id: <994101642.836710@goodnews.cos.agilent.com>

I am having problems installing this interface. Does anyone know of a
mailing list that I can sent the details to in order to get some help???

Thanks,
Bill




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

Date: 2 Jul 2001 14:27:43 -0700
From: weedmonster_99@yahoo.com (codeslayer)
Subject: Re: Query:  PERL v.s. Perl ==>  What's the difference???
Message-Id: <4b459565.0107021327.1cc3fbb0@posting.google.com>

Thank you all for all your responses; they were all very informative
and now I am just a little bit smarter through your help.

Thanks Again,

Codeslayer.


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

Date: Mon, 02 Jul 2001 19:24:55 GMT
From: mikee@kensho.eggtech.com (Mike Eggleston)
Subject: ref($val) not returning anything?
Message-Id: <slrn9k1ik7.8j7.mikee@kensho.eggtech.com>

I have some code that assigns a literal to a scalar.
On the scalar I use ref and test for SCALAR.
The function ref() does not return anything (as if its returning undef).
Any ideas?

Mike

my($val);
$val = 'a literal';
if(ref($val) eq 'SCALAR') {
	print "found a scalar\n";
} else {
	print "not a valid data time at " . __FILE__ ':' . __LINE__ . "\n";
}


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

Date: 2 Jul 2001 20:16:05 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: ref($val) not returning anything?
Message-Id: <9hqkq5$li6$1@towncrier.cc.monash.edu.au>

mikee@kensho.eggtech.com (Mike Eggleston) writes:

>I have some code that assigns a literal to a scalar.
>On the scalar I use ref and test for SCALAR.
>The function ref() does not return anything (as if its returning undef).
>Any ideas?

ref only returns "SCALAR" if $val holds a *reference* to a scalar.
For non-reference values (i.e. strings and numbers) it returns false.

So you probably want to test:

	if (!ref $val)	{	# not a reference, so must be a scalar value

or perhaps:

	if (defined $val && !ref $val)  {



Damian


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

Date: Mon, 02 Jul 2001 15:24:51 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: ref($val) not returning anything?
Message-Id: <3B40D893.8A9927BC@home.com>

Mike Eggleston wrote:
> 
> I have some code that assigns a literal to a scalar.
> On the scalar I use ref and test for SCALAR.
> The function ref() does not return anything 
> (as if its returning undef).
>
> my($val);
> $val = 'a literal';
> if(ref($val) eq 'SCALAR') {
[snip]

$val is a scalar, not a reference to a scalar. There's a difference!

ref() tells you whether or not an expression contains a reference, and
if so, what type of thing it refers to. It returns undef here because
$val isn't a reference.

-mjc


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

Date: 2 Jul 2001 12:28:39 -0700
From: les_ander@yahoo.com (les ander)
Subject: Re: Settings locale failed
Message-Id: <a2972632.0107021128.6be84381@posting.google.com>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message news:<9hg21g$njg$4@mamenchi.zrz.TU-Berlin.DE>...

> According to Andy Dougherty <doughera@maxwell.phys.lafayette.edu>:

> > In article <a2972632.0106281008.38edf409@posting.google.com>, les ander wrote:

> > >Hi, 

>  

> > >perl: warning: Setting locale failed.

> > 

> > [etc.]

> > 

> > Try 

> > 	man perllocale

> > 

> > and check out the section "LOCALE PROBLEMS".

> 

> ...or, if you don't really care about the locale, just unset the $LANG

> environment variable in your shell setup.

> 

> Anno



I am using tcsh so i did setenv $LANG=""

but i still get this dreadfull message...
can someone please help me fix it. 
thanks


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

Date: 02 Jul 2001 14:55:50 -0500
From: Aaron Baugher <abaugher@esc.pike.il.us>
Subject: Using DBI with PlRPC
Message-Id: <haruchai.m3bsn3t8ah.fsf@esc.pike.il.us>

Hi,

I have a client-server app I've written using PlRPC.  The
server side makes a DBI connection to a MySQL database, in
the BEGIN section of the server, and makes itself available
as an RPC::PlServer.  The client uses RPC::PlClient, and
asks the server to make DBI calls and return the results.
Everything works great.

What I'm wondering is, what happens when two RPC::PlClient
clients talk to my server at the same time.  Is a second
copy of my server started, with a second DBI connection?  Or
do both client connections end up sharing the same DBI
connection?  And in either case, is there anything I need to
do to prevent possible conflicts between simultaneous DBI
calls?


Thanks,
Aaron
-- 
abaugher@esc.pike.il.us - Coatsburg, IL, USA
Extreme Systems Consulting - http://esc.pike.il.us/
CGI, Perl, and Linux/Unix Administration



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

Date: 2 Jul 2001 16:50:16 -0500
From: Anonymous <anonymous@anonymous.anonymous>
Subject: Vapo-Rub
Message-Id: <3b40ec98_3@anonymous>

I am thinking of using Vapo-Rub as a lubricant when I do the Wild Thing?
Anyone know of precautions or tips?


  --------== Posted Anonymously via Newsfeeds.Com ==-------
     Featuring the worlds only Anonymous Usenet Server
    -----------== http://www.newsfeeds.com ==----------


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

Date: 2 Jul 2001 22:14:29 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Vapo-Rub
Message-Id: <994111794.25989@itz.pp.sci.fi>

In article <3b40ec98_3@anonymous>, Anonymous wrote:
>I am thinking of using Vapo-Rub as a lubricant when I do the Wild Thing?
>Anyone know of precautions or tips?

Sure.  Always enable warnings and strict mode.

  #!/usr/bin/perl -w
  use strict;

If what you're doing might involve people you don't know and trust well,
also turn on taint checks.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"/* If you don't understand, don't touch */"  -- Abigail in the monastery



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

Date: 3 Jul 2001 00:56:54 GMT
From: cfairman@Stanford.EDU (Carolyn Jean Fairman)
Subject: Website uses frames to call perl scripts -- must I use frames?
Message-Id: <9hr58m$19f$1@nntp.Stanford.EDU>


I've inherited a website which uses frames.  Generally the left frame
calls a perl script related to if someone is logged in or not, and
displays appropriate content (eg logout, show data).  These
dynamically generated links on the left call other scripts to put
information in the main window.

The frames let the pieces act independently so I don't know if I can
redo this without frames.  Would the entire page have to be
regenerated each time (rather than just changing the main.html frame)?
Is this much slower? 

I see so many sites which are NOT using frames and I'm sure they are
doing something interesting and dynamic but of course I just see the
output. 

--Carolyn


-- 
	Carolyn Fairman
http://www.stanford.edu/~cfairman/


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 1232
***************************************


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