[16741] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4153 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 28 14:10:56 2000

Date: Mon, 28 Aug 2000 11:10:36 -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: <967486235-v9-i4153@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 28 Aug 2000     Volume: 9 Number: 4153

Today's topics:
        Help Calling A Function!!!! houseofpain@my-deja.com
    Re: Help Calling A Function!!!! (Anno Siegel)
    Re: Help Calling A Function!!!! <philipg@atl.mediaone.net>
    Re: Help Calling A Function!!!! houseofpain@my-deja.com
    Re: Help Calling A Function!!!! <sariq@texas.net>
    Re: Help Calling A Function!!!! <sariq@texas.net>
    Re: How do I manipulate each element of an array? <ren.maddox@tivoli.com>
        How to create a simple backup program? monkfunk@my-deja.com
    Re: How to create a simple backup program? <philipg@atl.mediaone.net>
        Mailform doesn't work for AOL? <tsugiimage@yahoo.com>
        making sure input is a certain way i.e. starting and en <star@sonic.net>
    Re: MySQL and perl (Martien Verbruggen)
    Re: MySQL and perl <Peter.Dintelmann@dresdner-bank.com>
        New user <answers@siriussolutions.com>
    Re: newbie question about "uninitialized variables" (Jon S.)
    Re: No Server Logs <brock_johnson@my-deja.com>
    Re: Online Perl Study/Reference Guides <mc@backwoods.org>
    Re: pattern matching question <bkennedy99@home.com>
    Re: pattern matching question <thomas@daimi.au.dk>
        Problems with script to download a file (J. Cooper)
    Re: Problems with script to download a file <grocock@ntlworld.com>
    Re: Problems with script to download a file <tom.kralidis@ccrs.nrcan.gcDOTca>
    Re: regular expression watching bracket hierarchy? <anvs.pk@flashcity.de>
    Re: regular expression watching bracket hierarchy? <anvs.pk@flashcity.de>
        Script to Copy Files anant_joshi@yahoo.com
    Re: Search engine skesavan@my-deja.com
    Re: selling perl to management (Mike Stok)
    Re: selling perl to management mr_curmudgeon@my-deja.com
    Re: selling perl to management <bart.lateur@skynet.be>
    Re: selling perl to management (Marcel Grunauer)
        Sorry, MSIE5 toni_cornelissen@my-deja.com
        Sorry, MSIE5 toni_cornelissen@my-deja.com
    Re: spaces at the end of a string (Keith Calvert Ivey)
    Re: spaces at the end of a string <gellyfish@gellyfish.com>
    Re: Syntax Error <galton@dreamscape.com>
        turn characters into meta characters aaronp243@my-deja.com
    Re: use CGI to remove files <lr@hpl.hp.com>
        Win32 path with spaces <sturdevr@yahoo.com>
    Re: would you recommend buying a book (avast)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 28 Aug 2000 15:02:38 GMT
From: houseofpain@my-deja.com
Subject: Help Calling A Function!!!!
Message-Id: <8oduu6$a09$1@nnrp1.deja.com>

The function I want to call is somewhere in the inheritance hierarchy.
You would normally call $this->foo() and it would search for the
function from the derived class to the base class.  My problem is that
the function foo() is stored in a variable.
Example:
		my $function = “foo”;

I want to be able to say $this->$function, but perl does not seem to
like that.  Does anyone know how to do this.

Thanks,

Josh


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 28 Aug 2000 15:44:12 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help Calling A Function!!!!
Message-Id: <8oe1cc$ekr$1@lublin.zrz.tu-berlin.de>

 <houseofpain@my-deja.com> wrote in comp.lang.perl.misc:
>The function I want to call is somewhere in the inheritance hierarchy.
>You would normally call $this->foo() and it would search for the
>function from the derived class to the base class.  My problem is that
>the function foo() is stored in a variable.
>Example:
>		my $function = “foo”;

Uh.  Your quotes look funny.  I'd check them.

>I want to be able to say $this->$function, but perl does not seem to
>like that.  Does anyone know how to do this.

Perl likes this just fine.  Your problem is something else.

Anno


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

Date: Mon, 28 Aug 2000 15:52:37 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: Help Calling A Function!!!!
Message-Id: <9Vvq5.12287$d8.2648797@typhoon.southeast.rr.com>

<houseofpain@my-deja.com> wrote in message
news:8oduu6$a09$1@nnrp1.deja.com...
[snip]
> my $function = "foo";
>
> I want to be able to say $this->$function, but perl does not seem to
> like that.  Does anyone know how to do this.

This may not the most graceful solution, but it works:

my $function = 'foo';
eval "\$this->$function";

hth,
Philip




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

Date: Mon, 28 Aug 2000 17:12:57 GMT
From: houseofpain@my-deja.com
Subject: Re: Help Calling A Function!!!!
Message-Id: <8oe6i7$jgf$1@nnrp1.deja.com>

In article <9Vvq5.12287$d8.2648797@typhoon.southeast.rr.com>,
  "Philip Garrett" <philipg@atl.mediaone.net> wrote:
> <houseofpain@my-deja.com> wrote in message
> news:8oduu6$a09$1@nnrp1.deja.com...
> [snip]
> > my $function = "foo";
> >
> > I want to be able to say $this->$function, but perl does not seem to
> > like that.  Does anyone know how to do this.
>
> This may not the most graceful solution, but it works:
>
> my $function = 'foo';
> eval "\$this->$function";
>

Best answer I've heard so far.  Thanks
> hth,
> Philip
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 12:30:28 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Help Calling A Function!!!!
Message-Id: <39AAA1B4.922B15D2@texas.net>

houseofpain@my-deja.com wrote:
> 
> In article <9Vvq5.12287$d8.2648797@typhoon.southeast.rr.com>,
>   "Philip Garrett" <philipg@atl.mediaone.net> wrote:
> > <houseofpain@my-deja.com> wrote in message
> > news:8oduu6$a09$1@nnrp1.deja.com...
> > [snip]
> > > my $function = "foo";
> > >
> > > I want to be able to say $this->$function, but perl does not seem to
> > > like that.  Does anyone know how to do this.
> >
> > This may not the most graceful solution, but it works:
> >
> > my $function = 'foo';
> > eval "\$this->$function";
> >
> 
> Best answer I've heard so far.  Thanks

How could you possibly think that 'eval EXPR' is better than Greg
Bacon's answer to your question the last time you posted it?

"If you want to call a method whose name is in $meth, do this
  
     $obj->$meth();
  
"For this particular form, you have to use a scalar (as opposed to an
expression yielding a scalar), and the parentheses are mandatory."

- Tom


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

Date: Mon, 28 Aug 2000 12:38:51 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Help Calling A Function!!!!
Message-Id: <39AAA3AB.A12A1476@texas.net>

Anno Siegel wrote:
> 
>  <houseofpain@my-deja.com> wrote in comp.lang.perl.misc:
> >The function I want to call is somewhere in the inheritance hierarchy.
> >You would normally call $this->foo() and it would search for the
> >function from the derived class to the base class.  My problem is that
> >the function foo() is stored in a variable.
> >Example:
> >               my $function = ?foo?;
> 
> Uh.  Your quotes look funny.  I'd check them.
> 
> >I want to be able to say $this->$function, but perl does not seem to
> >like that.  Does anyone know how to do this.
> 
> Perl likes this just fine.

Not exactly.  As Greg Bacon pointed out the last time the OP posted this
question, parentheses are mandatory.  I.e.,

$this->$function();

- Tom


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

Date: 28 Aug 2000 11:18:07 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: How do I manipulate each element of an array?
Message-Id: <m38zth5phc.fsf@dhcp11-177.support.tivoli.com>

sumus@aut.dk (Jakob Schmidt) writes:

> foreach ( @array ) { $_ or $_ = '&nbsp;' }

You can also use:

$_ ||= '&nbsp;' for @array;

> Note this will change any false array value (including 0, '0', undef) to
> '&nbsp;'. If you expressly only want empty strings changed use
> 
> foreach ( @array ) { $_ eq '' and $_ = '&nbsp;' }

or:

$_ eq '' and $_ = '&nbsp;' for @array;


-- 
Ren Maddox
ren@tivoli.com


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

Date: Mon, 28 Aug 2000 14:59:44 GMT
From: monkfunk@my-deja.com
Subject: How to create a simple backup program?
Message-Id: <8oduop$9tv$1@nnrp1.deja.com>

I really have no idea where to start.

If I want to backup *.txt from "C:" or "/" and preserve the directory
structure, how would I do this?  I didn't want to use a bunch of system
functions.

I've been reading perldocs and splitting my perl book for weeks now.  I
hate to post such a general question but I'd like to see an example at
this point.

I'm just trying to replace a horrible WinBatch program we're using.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 15:47:25 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: How to create a simple backup program?
Message-Id: <hQvq5.12272$d8.2648025@typhoon.southeast.rr.com>

<monkfunk@my-deja.com> wrote in message news:8oduop$9tv$1@nnrp1.deja.com...
> I really have no idea where to start.
>
> If I want to backup *.txt from "C:" or "/" and preserve the directory
> structure, how would I do this?  I didn't want to use a bunch of system
> functions.
>

You probably want some combination of File::Find, Archive::Tar, and
Compress::Zlib.

hth
Philip




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

Date: Mon, 28 Aug 2000 13:24:18 -0400
From: "Tsugihiko Tanaka" <tsugiimage@yahoo.com>
Subject: Mailform doesn't work for AOL?
Message-Id: <8oe8uo$j01$1@news.ysu.edu>

  I set up a mailform on a webpage, but it seems not working using AOL .

Thank you,

Tsugiimage




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

Date: Mon, 28 Aug 2000 17:41:53 GMT
From: arthur <star@sonic.net>
Subject: making sure input is a certain way i.e. starting and ending with double quotes
Message-Id: <B5CF49AD.6F9A%star@sonic.net>

#!/usr/bin/perl -w

use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use IO File;
use strict;
use File::Copy;

Good Morning,

regarding the script below:

I need what the user (I love that name) inputs into 'question' to start and
end with double quotes. How can I check that and put up a warning message if
they have not started and ended in double quotes.
------------------------

print header;
                print start_html('A Simple Example'),
           start_form,
                    "The name of your game is: ",textfield('$name'),
                                    p,
                    "What are your questions? ",textfield('question'),
                           p,
                    submit,
    
                        end_form,
    hr;
      if (param()) {
    print 
                      "The name is: ",em(param('$name')),
                        p,
                     "Your questions are: ",em(param('question')),
                     p,


print end_html;
}
----------------



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

Date: Tue, 29 Aug 2000 00:22:54 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: MySQL and perl
Message-Id: <slrn8qkpte.sk8.mgjv@martien.heliotrope.home>

On Mon, 28 Aug 2000 12:57:36 GMT,
	Abel Almazan <abel@inlander.es> wrote:
> What i need to connect to a Mysql database with perl??
> 
> I have DBI installed. What's the name of the next module i have to
> install??

DBD::mysql

The sources for that module can be obtained from
http://www.mysql.com/Downloads/Contrib/, from CPAN (http://www.cpan.org/
or the CPAN module), or via
http://www.symbolstone.org/technology/perl/DBI

The module is distributed as part of the Msql-Mysql-modules package

> And when i install the modules, perl automaticxally connects to the
> database or i need to do something more with the mysql or perl
> configuration??

You read the documentation of the driver which tells you what to do.

# perldoc DBD::mysql

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Begin at the beginning and go on
Commercial Dynamics Pty. Ltd.   | till you come to the end; then stop.
NSW, Australia                  | 


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

Date: Mon, 28 Aug 2000 15:18:29 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: MySQL and perl
Message-Id: <8odorc$jqv2@intranews.bank.dresdner.net>

    Hi,

Abel Almazan schrieb in Nachricht <39AA61A3.CC1E0EB0@inlander.es>...
>What i need to connect to a Mysql database with perl??
>
>I have DBI installed. What's the name of the next module i have to
>install??

    DBD::mysql

>And when i install the modules, perl automaticxally connects to the
>database or i need to do something more with the mysql or perl
>configuration??

    Read the documentation that came
    along with DBI. Have a look at
    http://www.symbolstone.org/technology/perl/DBI/index.html

    Regards,

        Peter Dintelmann






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

Date: Mon, 28 Aug 2000 17:22:58 GMT
From: "NBNet News" <answers@siriussolutions.com>
Subject: New user
Message-Id: <Sdxq5.8226$bW2.88749@sodalite.nbnet.nb.ca>

Hi folks

I am a new user, and am having a little problem.  I have a perl script which
I want to run on an IIS server.  I believe I need some runtime files to
execute this, but I'm not sure.  Does anybody have insight for me?

Nick Bishop
nick@siriussolutions.com






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

Date: Mon, 28 Aug 2000 15:35:49 GMT
From: jonceramic@nospammiesno.earthlink.net (Jon S.)
Subject: Re: newbie question about "uninitialized variables"
Message-Id: <39aa86cb.8350310@news.earthlink.net>

On 26 Aug 2000 13:54:53 GMT, Ilmari Karonen <iltzu@sci.invalid> wrote:

>In article <39a67fab.3334402@news.earthlink.net>, Jon S. wrote:
>>On 23 Aug 2000 21:46:17 GMT, Ilmari Karonen <iltzu@sci.invalid> wrote:
> [snip]
>>
>>But, to use it, I'd just need to place Carp.pm in my cgi-bin, and call
>>it via a... 
>>use Carp qw(fatalsToBrowser); 
>>
>>Rather than the...
>>>  use lib '/home/username/perlmod';
>>>  use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
>>...you listed at the end of the message, which applies only if I can
>>actually install the entire module locally.  
>
>The issue is that the module contains a package named CGI::Carp, so
>that's what you should call it in the "use" statement to make the
>import mechanism work as intended.  And if you write "use CGI::Carp",
>it looks for a file named "Carp.pm" in a directory named "CGI".
>
>So what you can do is either:
>
> a) Get your sysadmin to install it somewhere along the default @INC
>    path list, for example as /usr/lib/perl5/5.005/CGI/Carp.pm
>
> b) Put it in a subdirectory of the current directory of your script,
>    i.e. ./CGI/Carp.pm, and make sure what you think is the current
>    really _is_ the current directory when the script is run by the
>    webserver.
>
> c) Put it anywhere, as long as the path ends in "/CGI/Carp.pm", and
>    put the beginning of that path in a "use lib" statement.
>
>The order of preference is generally a > c > b.

Great!  Thanks.

Jon


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

Date: Mon, 28 Aug 2000 17:37:38 GMT
From: Brock <brock_johnson@my-deja.com>
Subject: Re: No Server Logs
Message-Id: <8oe80v$lik$1@nnrp1.deja.com>


> In article <slrn8qjptd.r6v.efflandt@efflandt.xnet.com>,
  efflandt@xnet.com wrote:
> Put your own simple wrapper around your script that redirects stderr to
> stdout and prints it in plain text:
>
> #!/usr/bin/perl
> print "Content-type: text/plain\n\n";
> print `myother.cgi 2>&1`;     # note: backticks

Thanks alot, David. That looks very helpful. Now, I'm off to Perldoc Land to
find out what a wrapper is, and how to use it.

--
The Best to all!
Brock Johnson


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 09:04:12 -0400
From: MC <mc@backwoods.org>
Subject: Re: Online Perl Study/Reference Guides
Message-Id: <39AA634C.5BF690B7@backwoods.org>

Bob, Thanks much, I looked at Perl.com briefly but aparently didnt look in the
right place. Again thanks. =)

MC

Bob Walton wrote:
> 
> MC wrote:
> ...
> > Can someone post a few links to online basic perl lessons and references. Also a
> > few good study books suggestions.
> >
> > This is for a friend who is interested in learning perl. He is not new to
> > programming, just wants to learn a new language.
> >
> > MC
> ...
> http://www.perl.com/reference/query.cgi?tutorials
> 
> Learning Perl
> Programming Perl
> 
> http://www.oreilly.com
> 
> --
> Bob Walton

-- 
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"The world wont end with a bang, or even a whimper, but with an error
message." -- format C:


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

Date: Mon, 28 Aug 2000 15:31:41 GMT
From: "Ben Kennedy" <bkennedy99@home.com>
Subject: Re: pattern matching question
Message-Id: <xBvq5.132524$A%3.1697980@news1.rdc2.pa.home.com>


"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:39A9CB41.C7D242FC@stomp.stomp.tokyo...
> Wyzelli wrote:
> > Did you try with $string = ' - - - - - ' ?
>
> > "Boss, your script fails the criteria"
>
>
> "....6 digit, hyphen delimited set of numbers,
>  each no less than 0 nor greater than 4 ."
>
> Work on your reading comprehension skills

This is the match criteria, not the input criteria.  Please read what the
original poster wanted -

"I'm trying to check a pattern to ensure that it's a 6 digit, hyphen
delimited set of numbers, each no less than 0 nor greater than 4 ."

What this means is that there could be *any* input, and the purpose of the
code check is to determine whether or not it meets his limited criteria as
specified above.  It does not say what the input parameters are.  So, the
input string of " - - - - - " is perfectly valid, and the pattern checking
routine should detect is as an invalid string, as well as
"01-02-03-01-02-03" or "A-B-C-D-E-F" or "bleh".  As Andrew McGuire stated,
it would have been nice if the OP had defined what the input parameters
were.  If they were "hyphen delimited strings containing only numbers" your
solution would have been fine, since the case " - - - - - " would have been
excluded.

The OP already had the most efficient solution, minus the ^ and $
characters, which Jakob Schmidt fixed.  Regular expression were designed for
this kind of thing.

--Ben Kennedy




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

Date: 28 Aug 2000 17:47:53 +0200
From: Thomas Jespersen <thomas@daimi.au.dk>
Subject: Re: pattern matching question
Message-Id: <y4npumte6ae.fsf@commodus.daimi.au.dk>

david@palmetto.net (David Gay) writes:

> Greetings-
> 
> I'm trying to check a pattern to ensure that it's a 6 digit, hyphen
> delimited set of numbers, each no less than 0 nor greater than 4 .
> 
> Example:
> 0-1-2-3-4-4 or 1-2-1-3-4-0 is acceptable.
> 02-1-2-3-4-4 or 0-1-2-3-4-5 is not acceptable.

/^([0-4]\-){5}[0-4]$/



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

Date: Mon, 28 Aug 2000 13:55:36 GMT
From: jcoop@interlog.com (J. Cooper)
Subject: Problems with script to download a file
Message-Id: <39aa6e1e.2368997@meganews.idirect.com>

I'm trying to get a script working which will download an 
Acrobat file from our Website.  Both the perl script and the file are
in cgi-bin.  The calling html page is a subdirectory off the main site
".../tlc3/

The script is called by the following line:

<a href="../cgi-bin/dl_file.pl">Download Proceedings</a>

The actual script is:

#!/usr/bin/perl
# dl_file.pl : simple cgi file download
use CGI;
print "content-type: application/*\n\n";
$DLFILE="../cgi-bin/Symposium2000Proceedings.pdf";
open(DLFILE, $DLFILE) || die "Can not open $DLFILE: $!\n";
while(read DLFILE, $buffer, 256)
{
   print $buffer;
}
close (DLFILE);
exit; 

What happens is that the dialog box appears, asking if user wants to
save file to disk, or run from current location.  This is what I want
to happen.  Unfortunately, the wrong file is downloaded.  The
dl_file.pl is downloaded instead of the symposium2000proceedings.pdf.
Anyone have any ideas as to what is going wrong?

Thanks,

Jean


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

Date: Mon, 28 Aug 2000 15:59:41 +0100
From: "grocock" <grocock@ntlworld.com>
Subject: Re: Problems with script to download a file
Message-Id: <A6vq5.4712$EB2.103470@news2-win.server.ntlworld.com>

why don't you just add a link to the pdf file? the only reason I can think
of for using a cgi-script is to track the number of downloads, which your
program doesn't do...

"J. Cooper" <jcoop@interlog.com> wrote in message
news:39aa6e1e.2368997@meganews.idirect.com...
> I'm trying to get a script working which will download an
> Acrobat file from our Website.  Both the perl script and the file are
> in cgi-bin.  The calling html page is a subdirectory off the main site
> ".../tlc3/
>
> The script is called by the following line:
>
> <a href="../cgi-bin/dl_file.pl">Download Proceedings</a>
>
> The actual script is:
>
> #!/usr/bin/perl
> # dl_file.pl : simple cgi file download
> use CGI;
> print "content-type: application/*\n\n";
> $DLFILE="../cgi-bin/Symposium2000Proceedings.pdf";
> open(DLFILE, $DLFILE) || die "Can not open $DLFILE: $!\n";
> while(read DLFILE, $buffer, 256)
> {
>    print $buffer;
> }
> close (DLFILE);
> exit;
>
> What happens is that the dialog box appears, asking if user wants to
> save file to disk, or run from current location.  This is what I want
> to happen.  Unfortunately, the wrong file is downloaded.  The
> dl_file.pl is downloaded instead of the symposium2000proceedings.pdf.
> Anyone have any ideas as to what is going wrong?
>
> Thanks,
>
> Jean




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

Date: Mon, 28 Aug 2000 10:39:17 -0400
From: "Tom Kralidis" <tom.kralidis@ccrs.nrcan.gcDOTca>
Subject: Re: Problems with script to download a file
Message-Id: <8odtil$iiv13@nrn2.NRCan.gc.ca>

Rethink your web design.  cgi-bin/ should be for just that.  Put the documents
in the appropriate area.

 ..Tom

--
=================================
Tom Kralidis
Systems Specialist
Canada Centre for Remote Sensing
Tel: (613) 947-1828
http://www.nrcan.gc.ca/~tkralidi/
=================================
"J. Cooper" <jcoop@interlog.com> wrote in message
news:39aa6e1e.2368997@meganews.idirect.com...
> I'm trying to get a script working which will download an
> Acrobat file from our Website.  Both the perl script and the file are
> in cgi-bin.  The calling html page is a subdirectory off the main site
> ".../tlc3/
>
> The script is called by the following line:
>
> <a href="../cgi-bin/dl_file.pl">Download Proceedings</a>
>
> The actual script is:
>
> #!/usr/bin/perl
> # dl_file.pl : simple cgi file download
> use CGI;
> print "content-type: application/*\n\n";
> $DLFILE="../cgi-bin/Symposium2000Proceedings.pdf";
> open(DLFILE, $DLFILE) || die "Can not open $DLFILE: $!\n";
> while(read DLFILE, $buffer, 256)
> {
>    print $buffer;
> }
> close (DLFILE);
> exit;
>
> What happens is that the dialog box appears, asking if user wants to
> save file to disk, or run from current location.  This is what I want
> to happen.  Unfortunately, the wrong file is downloaded.  The
> dl_file.pl is downloaded instead of the symposium2000proceedings.pdf.
> Anyone have any ideas as to what is going wrong?
>
> Thanks,
>
> Jean




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

Date: Mon, 28 Aug 2000 18:20:14 +0200
From: "Peter K" <anvs.pk@flashcity.de>
Subject: Re: regular expression watching bracket hierarchy?
Message-Id: <8oe2sh$agmh2$1@ID-26919.news.cis.dfn.de>

jason <elephant@squirrelgroup.com> wrote in message
news:MPG.1412277180ad66789896fc@localhost...

>   perldoc Text::ParseWords

That's it,
Thanks








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

Date: Mon, 28 Aug 2000 18:29:18 +0200
From: "Peter K" <anvs.pk@flashcity.de>
Subject: Re: regular expression watching bracket hierarchy?
Message-Id: <8oe3dc$ao0rq$1@ID-26919.news.cis.dfn.de>


Jim Mauldin <mauldin@netstorm.net> wrote in message
news:39A7B980.F314D208@netstorm.net...

[...]
>
> Well, if you mean what you say, then
>
> $_ = 'funcA(100,varB*(varC-funcB(8)),"abd)cdefg")';
> chop;
> @A = split /\(/, $_,2;
>
> will give you the output you want.  If you then want to extract the
> paramaters, split $A[1] on /,/.
>

Imagine a comma within the constant string ;).

Regards,
Peter





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

Date: Mon, 28 Aug 2000 17:49:41 GMT
From: anant_joshi@yahoo.com
Subject: Script to Copy Files
Message-Id: <8oe8nd$md4$1@nnrp1.deja.com>

I need to copy several report files daily from different sources
to my IIS server. Currently, operators initiate a job which copies
the files and builds index pages.

I want to automate the process and copy the report files.

Has anyone developed a [perl] script for doing this?

Are there any alternatives (other than developing BAT file) ?

Thanks


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 13:39:04 GMT
From: skesavan@my-deja.com
Subject: Re: Search engine
Message-Id: <8odq1l$4gm$1@nnrp1.deja.com>

In article <8od9dl$9jh$1@proxy.fe.internet.bosch.de>,
  Pratibha Sundarmurthy <Pratibha.S@in.bosch.com> wrote:
> Hello,
>     Can anyone give me some info about where I can get some info about
> developing a search engine for a web server in Perl ?
> Any site , any book ?
>

> Any tip will be appreciated.
> thanks in advance


Check out the WWW::Search and it's associated modules which are a set
of Perl API to web based search engines.

Sree


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 13:49:27 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: selling perl to management
Message-Id: <H5uq5.20881$K5.359601@typhoon.austin.rr.com>

In article <slrn8qkjlo.3fr.mgjv@martien.heliotrope.home>,
Martien Verbruggen <mgjv@tradingpost.com.au> wrote:

>I happen to think they can be compared. Especially C and Perl can be
>compared. They have differences, but also many things in common. The
>main difference is that C has standard, and Perl doesn't. However, the
>C standard, or rather, the various C standards, have never guaranteed
>any backward compatibility. In reality, of course, it is a major
>concern, but it is also a mjor concern for a new release of Perl.

One crucial difference between C and Perl is that the installation of a
new C compiler with new behaviour doesn't break all of the compiled code
on a machine - it's only at compile time that you suffer the pain.  In
general use you compile C once then the binary is what's executed , but
perl usually compiles every time a script is run.

With or without standards perl compilation is a much more common event
than C compilation.

On balance Perl saves more time than it burns, for me at least.

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |
GPG PGP Key 1024D/059913DA         | Fingerprint      0570 71CD 6790 7C28 3D60
stok@colltech.com (CT - work)      |                  75D2 9EC4 C1C0 0599 13DA


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

Date: Mon, 28 Aug 2000 15:27:28 GMT
From: mr_curmudgeon@my-deja.com
Subject: Re: selling perl to management
Message-Id: <8oe0ch$bt0$1@nnrp1.deja.com>

In article <8o621i$ojp$1@nnrp1.deja.com>,
  reg_exp@my-deja.com wrote:
> hi,
>
> i would like the groups remarks, criticism, suggestions and
pointers to
> web-resources that highlight the pros & cons of using perl.

As a pointy-haired IT manager, I'd have to say that Perl's greatest
weaknesses can be seen in the responses to this post. Perl's
greatest strength is (allegedly) the Perl community, and when you
asked for help, the usenet neighborhood of the community turned
on itself like sharks in a feeding frenzy. Ask yourself:

--These are the people that are going to put together a standard?
Even a de facto standard? They're going to agree on a coding style
and architecture and work on a project together?

--Did I get any help?

I don't think your managers are going to be sold by a response as
reasoned and critical as "you're just stoopid," and I think this is
what they had in mind when they said that it would be a pain in the
ass to find professional Perl programmers. Chops are important,
but there's a large component of professionalism that has
nothing to do programming virtuosity.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 15:54:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: selling perl to management
Message-Id: <1j2lqsgi8pn1e4f2f0jmivduruu22974ep@4ax.com>

mr_curmudgeon@my-deja.com wrote:

>--These are the people that are going to put together a standard?
>Even a de facto standard? They're going to agree on a coding style
>and architecture and work on a project together?

Go lurking in the perl6 mailing lists, to see that in effect. On average
300 messages a day (over 5500 message in the last 4 weeks), and all
trying to build a consensus on what Perl6 ought to look like. It looks
to me like it *is* working.  <http://www.perl.org/perl6/>

-- 
	Bart.


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

Date: Mon, 28 Aug 2000 16:05:59 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: selling perl to management
Message-Id: <slrn8ql3eq.28f.marcel@gandalf.local>

On Mon, 28 Aug 2000 15:27:28 GMT, mr_curmudgeon@my-deja.com
<mr_curmudgeon@my-deja.com> wrote:

>As a pointy-haired IT manager, I'd have to say that Perl's greatest
>weaknesses can be seen in the responses to this post. Perl's
>greatest strength is (allegedly) the Perl community, and when you
>asked for help, the usenet neighborhood of the community turned
>on itself like sharks in a feeding frenzy. Ask yourself:

That must be your imagination running wild; maybe you're projecting
something that's not really there.

What I can see in this thread is a lot of informed discussion by people
who also actively develop Perl (see p5p and perl6 mailing lists), with
some speculation as to the development process by people who don't
develop the language.

>--These are the people that are going to put together a standard?
>Even a de facto standard? They're going to agree on a coding style
>and architecture and work on a project together?

This group, interesting though it is, is not the be-all and end-all of
Perl. The language itself isn't developed here, and standards (if any)
aren't going to be put together here. Read the aforementioned lists to
get a feeling for how the development process works.

This list is (by design or not, but it is) more about using Perl than
developing Perl. As such it is for many people an invaluable resource. If
you can stand the occasional heat, and if you really want to listen,
there is a lot to be learned in this group.

Many frequent posters (and not-so-frequent posters, of course) are
extremely helpful and knowledgable. They don't have to do this, they
don't get paid, but if you've read the group for a while, you know it
to be true.

When I started to learn and use Perl, I've lurked for some time and got
an idea about real-world issues and questions people have about Perl. Now
I know a bit more about the language and culture, I still enjoy reading
(and occasionally participating) in these discussions, because there's
something new to be learned (almost) every day.

>--Did I get any help?

The original poster of this thread certainly did.

-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Mon, 28 Aug 2000 14:08:06 GMT
From: toni_cornelissen@my-deja.com
Subject: Sorry, MSIE5
Message-Id: <8odrnm$6jm$1@nnrp1.deja.com>

I wrote,

> When I use that script to include images in my web pages, the
> images won't show if I use MS Internet Explorer 4. (I got the

But I made a mistake in the version number. The images won't show
in MSIE5.

Greetings Toni


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 14:17:41 GMT
From: toni_cornelissen@my-deja.com
Subject: Sorry, MSIE5
Message-Id: <8ods9g$7aj$1@nnrp1.deja.com>

I wrote,

> When I use that script to include images in my web pages, the
> images won't show if I use MS Internet Explorer 4. (I got the

But I made a mistake in the version number. The images won't show
in MSIE5.

Greetings Toni


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 13:16:36 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: spaces at the end of a string
Message-Id: <39b365f3.65630420@news.newsguy.com>

"Dietmar Staab" <dietmar.staab@t-online.de> wrote:
>In article <39AA51CE.5DBE85DD@libero.it>, Sergio Brandano
><serbr@libero.it> wrote:
>> I am looking for the perl equivalent of the SQL command "trim", that
>> removes all the spaces at the end of a string.
>> 
>> trim: 'foo   ' -> 'foo'
>
>s/\s*$//

Change * to + (there's no point in deleting spaces that 
don't exist).

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: 28 Aug 2000 12:43:11 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: spaces at the end of a string
Message-Id: <8odj8f$e3v$1@orpheus.gellyfish.com>

On Mon, 28 Aug 2000 10:48:12 GMT Sergio Brandano wrote:
> Hi,
> 
> I am looking for the perl equivalent of the SQL
> command "trim", that removes all the spaces at
> the end of a string.
> 

You will probably find the item in perlfaq4 on this very matter useful.

/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Mon, 28 Aug 2000 12:18:19 -0400
From: "Greg Alton" <galton@dreamscape.com>
Subject: Re: Syntax Error
Message-Id: <sql442fqt91171@corp.supernews.com>

Outstanding!

Thank you all. I've learned something today.

Greg Alton
galton@dreamscape.com





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

Date: Mon, 28 Aug 2000 17:01:11 GMT
From: aaronp243@my-deja.com
Subject: turn characters into meta characters
Message-Id: <8oe5sa$ind$1@nnrp1.deja.com>

Hi, I have a programming question.  I have a string that contains
"\t\t\t\t".  Those are not tabs, they would be matched like this:
	m/\\t/g

but I want to turn them in to tabs.  However, I don't want to hardcode
anything.  I want to turn all "\n"'s into newlines, any "\t"'s into
tabs, etc.  Any help would be greatly appreciated.

-Aaron

:wq!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 28 Aug 2000 10:58:12 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: use CGI to remove files
Message-Id: <MPG.1414480fc7a50f7898ace4@nntp.hpl.hp.com>

In article <8ocv2h$ncg$1@news.cis.nctu.edu.tw> on 28 Aug 2000 05:58:41 
GMT, doco <is83024@cis.nctu.edu.tw> says...
> 
> Lincoln Marr (lincolnmarr@nospam.europem01.nt.com) ´£¨ì:
> : Could you possibly use the 'unlink' command which is virtually a synonym for
> : unix's 'rm' command?
> it still canot work through web browser . >.<

Huh?  Do you mean via a CGI program?  Why not?  It's just a question of 
what permissions are owned by the webserver program.

> it just like the command 'rm', it only can work correctly on unix system.

Huh?  Whatever do you mean by that?  It ('unlink') is a portable Perl 
built-in function.

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


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

Date: Mon, 28 Aug 2000 12:19:07 -0400
From: "BobS" <sturdevr@yahoo.com>
Subject: Win32 path with spaces
Message-Id: <8oe3dl$o98$1@bob.news.rcn.net>

Hi,

I'm having a problem with spaces in win32 path names. Specifically:

system( 'C:/program files/windows nt/accessories/wordpad.exe',
'c:/sms/readme.doc' );

launches wordpad but then wordpad chokes saying it cannot open
'c:\sms\files\windows'.
It appears perl is parsing the line twice. The second time _files/windows_
is thought to be the argument because of the surrounding spaces.  I've tried
several permutations but each that launched wordpad also produces this
error. I've found that

system( 'c:\program~1\window~2\access~1\wordpad.exe', 'c:\sms\readme.doc' )

opens wordpad and displays the readme but I'm concerned the numerals in the
DOS equivalent names may not be the same on all systems. I'd appreciate a
shove in the right direction. tia.




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

Date: Mon, 28 Aug 2000 16:44:21 GMT
From: avast@hortonsbay.com (avast)
Subject: Re: would you recommend buying a book
Message-Id: <39aa969d.15524692@news.mco.edu>

On 25 Aug 2000 21:23:01 GMT, abigail@foad.org (Abigail) wrote:

>Tim Hammerquist (tim@degree.ath.cx) wrote on MMDXLIX September MCMXCIII
>in <URL:news:slrn8q7gf8.66a.tim@degree.ath.cx>:
>{} 
>{} Book advice: If it's published by O'Reilly and includes Perl in the
>{} title, it's worth the money.
>
>Cargo cult. It's one of the most idiotic advices I've heard.

perldoc perlstyle | grep -i nice

avast


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

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

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


------------------------------
End of Perl-Users Digest V9 Issue 4153
**************************************


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