[18487] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 655 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 8 18:10:37 2001

Date: Sun, 8 Apr 2001 15:10:16 -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: <986767815-v10-i655@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 8 Apr 2001     Volume: 10 Number: 655

Today's topics:
    Re: So what do YOU use Perl for? (Randal L. Schwartz)
    Re: So what do YOU use Perl for? (Jon Bell)
    Re: So what do YOU use Perl for? <uri@sysarch.com>
    Re: So what do YOU use Perl for? <bart.lateur@skynet.be>
    Re: So what do YOU use Perl for? <no@spam.net>
        Touch <Waarddebon@chello.nl>
        Touch <Waarddebon@chello.nl>
    Re: Touch <joe+usenet@sunstarsys.com>
    Re: Touch (Steven Smolinski)
    Re: Touch <gellyfish@gellyfish.com>
    Re: what are the new languages? michal@gortel.phys.ualberta.ca
    Re: what are the new languages? <bart.lateur@skynet.be>
    Re: Windows but not UNIX!? (Me)
    Re: Windows but not UNIX!? <bart.lateur@skynet.be>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 08 Apr 2001 08:33:12 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: So what do YOU use Perl for?
Message-Id: <m1itkfcsp3.fsf@halfdome.holdit.com>

>>>>> "Szilvia" == Szilvia Oszko <soszko@gmu.edu> writes:

Szilvia> One recurring theme in this newsgroup seems to be that
Szilvia> Perl!=CGI and that while Perl is often used to write CGI
Szilvia> scripts, it can also be used to do a lot of other things. I'd
Szilvia> be curious to see what non-CGI stuff you do with Perl.

Well, Perl certainly had a life for the six years it existed before
the web came along. :)  "perldoc perlhist".

"Let's invent a language that we'll just putt around with until
the web comes along and then we can use it for CGI!  Yes!"

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 8 Apr 2001 16:51:34 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: So what do YOU use Perl for?
Message-Id: <GBHG5y.MJD@presby.edu>

In article <3ACFB415.63D2CA91@gmu.edu>, Szilvia Oszko  <soszko@gmu.edu> wrote:
> [...] I'd be curious to see what non-CGI stuff you do with Perl.

I use it to automate and speed up various Unix system administration 
tasks.  Most recently, I wrote a quick script that sent an e-mail to 
everyone who still has an a shell account on our old mail server (which 
has been superseded by a new one with a Web-based interface), telling them 
that their old accounts will be removed unless they speak up for them.

In a couple of weeks, I'll use another script to actually remove those 
accounts, except ones listed an an "exemption file" that I'm building 
based on the responses I get to my e-mail warning.

I also used Perl to write the "robot" that does most of the work in
moderating the newsgroup news.newusers.questions.  It processes all
incoming postings, checks the for format and looks for certain "trigger"
words or phrases, automatically returns some of them to their posters,
forwards some of them to human moderators for further inspection, and
posts the rest immediately.  The human moderators decide what to do with
their "referrals", then send them back to the robot, which actually posts
or returns them.  Perl is great for this sort of thing because of its 
text-manipulation and pattern-matching capabilities, and modules that 
simplify things like sending e-mail and posting newsgroup messages.

I've been programming in Perl for probably seven years or so, but wrote my
first CGI script just last month (a Web-based faculty survey form for one
of our committees).

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA


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

Date: Sun, 08 Apr 2001 17:14:19 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: So what do YOU use Perl for?
Message-Id: <x7y9tbpb4k.fsf@home.sysarch.com>


for most of the last year i have been developing Stem, a network
application suite and toolkit (see .sig for the site). it is over 4000
lines of pure perl with nary a cgi or html line in it. eventually it
will interface with the web but that will not be a primary component.

as you can see by the other posts, perl is used for much more than
web/cgi stuff. the problem is that perl is the most popular web/cgi
language and gets an incorrect reputation that is its main arena when
the opposite is true.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Sun, 08 Apr 2001 17:58:43 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: So what do YOU use Perl for?
Message-Id: <6m91dt04u1sgnthse3utof2k1ounf4n5r6@4ax.com>

Szilvia Oszko wrote:

>One recurring theme in this newsgroup seems to be that Perl!=CGI and
>that while Perl is often used to write CGI scripts, it can also be used
>to do a lot of other things. I'd be curious to see what non-CGI stuff
>you do with Perl.

For me, mainly data processing: fiels in, files out. If I need to write
a program that doesn't need a user interface, my first idea is to use
Perl. I wouldn't think of using it to write a text editor, for example.

-- 
	Bart.


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

Date: Sun, 08 Apr 2001 21:39:20 GMT
From: "Misanthrope" <no@spam.net>
Subject: Re: So what do YOU use Perl for?
Message-Id: <cU4A6.14830$VF3.1407314@newsread2.prod.itd.earthlink.net>


Database --> static web page generation.



"Szilvia Oszko" <soszko@gmu.edu> wrote in message
news:3ACFB415.63D2CA91@gmu.edu...
> One recurring theme in this newsgroup seems to be that Perl!=CGI and
> that while Perl is often used to write CGI scripts, it can also be used
> to do a lot of other things. I'd be curious to see what non-CGI stuff
> you do with Perl.
>
>




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

Date: Sun, 08 Apr 2001 07:44:54 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: Touch
Message-Id: <WFUz6.85670$Xx6.942390@Flipper>

When I try this:
$file="..\loper.txt";
touch -t 200104100303.55 $file;

I get the error message:
syntax error at loper.pl line 13, near "touch -t "
Scalar found where operator expected at loper.pl line 13, at end of line
    (Missing operator before ?)
Execution of loper.pl aborted due to compilation errors

But I can't figure out what is wrong with it




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

Date: Sun, 08 Apr 2001 08:35:58 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: Touch
Message-Id: <OpVz6.86679$Xx6.957410@Flipper>

When I try this to change the date and time of a file:
$file="..\loper.txt";
touch -t 200104100303.55 $file;

I get the error message:
syntax error at loper.pl line 13, near "touch -t "
Scalar found where operator expected at loper.pl line 13, at end of line
    (Missing operator before ?)
Execution of loper.pl aborted due to compilation errors

But I can't figure out what is wrong with it




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

Date: 08 Apr 2001 11:37:19 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Touch
Message-Id: <m3wv8v9zdc.fsf@mumonkan.sunstarsys.com>

"Waarddebon" <Waarddebon@chello.nl> writes:

> When I try this to change a files date and time:
> $file="..\loper.txt";
> touch -t 200104100303.55 $file;
> 
> I get the error message:
> syntax error at loper.pl line 13, near "touch -t "
> Scalar found where operator expected at loper.pl line 13, at end of line
>     (Missing operator before ?)
> Execution of loper.pl aborted due to compilation errors
> 
> But I can't figure out what is wrong with it

  % perldoc -f touch
  No documentation for perl function `touch' found

I think you need to use system() or maybe "use Shell" for this.
See

  % perldoc -f system
  % man Shell

HTH
-- 
Joe Schaefer            "Don't be so humble - you are not that great."
                                               --Golda Meir


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

Date: Sun, 08 Apr 2001 19:01:24 GMT
From: sjs@linux.ca (Steven Smolinski)
Subject: Re: Touch
Message-Id: <slrn9d1ibl.tc.sjs@ragnar.stevens.gulch>

Waarddebon <Waarddebon@chello.nl> wrote:
> When I try this to change the date and time of a file:
> $file="..\loper.txt";
> touch -t 200104100303.55 $file;
> 
> I get the error message:
> syntax error at loper.pl line 13, near "touch -t "
> Scalar found where operator expected at loper.pl line 13, at end of line
>     (Missing operator before ?)
> Execution of loper.pl aborted due to compilation errors

"touch" is not a perl function.  Perhaps you meant:

system( 'touch', '-t', '200104100303.55', $file );

See system() in the perlfunc manpage.

Steve
-- 
Steven Smolinski => http://www.steven.cx/


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

Date: 8 Apr 2001 19:35:11 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Touch
Message-Id: <9aqehf$bqk$1@uranium.btinternet.com>

Gregory Toomey <gtoomey@usa.net> wrote:
> "Waarddebon" <Waarddebon@chello.nl> wrote in message
> news:ZF_z6.93802$Xx6.1068775@Flipper...
>> When I try this to change a files date and time:
>> $file="..\loper.txt";
>> touch -t 200104100303.55 $file;
>>
>> I get the error message:
>> syntax error at loper.pl line 13, near "touch -t "
>> Scalar found where operator expected at loper.pl line 13, at end of line
>>     (Missing operator before ?)
>> Execution of loper.pl aborted due to compilation errors
>>
>> But I can't figure out what is wrong with it
>>
> Touch is a Unix command.
> You are programming in Perl. Lookup utime.
> 
> Would you speak to an Eskimo in Swahili?
> 

I am interested in this though - 'touch' *is* a unix command but so is
perl - this idea has flowed through this group for quite a few years now
and indeed there is a module 'Shell' that enables people to do :

use Shell;

open( FOO,'>ghgh') || die $!;
close FOO;
touch( 'ghgh');

I'm wondering whether there might not be a way of including Shell in an
@ISA for main :)

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 8 Apr 2001 16:33:14 GMT
From: michal@gortel.phys.ualberta.ca
Subject: Re: what are the new languages?
Message-Id: <9aq3sa$bhi$1@pulp.srv.ualberta.ca>

Jim Land <jland@bigfoot.com> wrote:
> "Todd Smith" <todd@designsouth.net> wrote in 
> <9Mcy6.3720$C51.1327860@news1.rdc1.tn.home.com>:

>>What's Parrot?
>>
>>

> Parrot is a text-based GUI builder, written by Philip Hunt. It is intended 
> to be used by programmers writing GUI applications. 

> Parrot is written in Python, and licenced under the GNU GPL. 

> http://www.vision25.demon.co.uk/prog/parrot.html

The only thing is that its web page says "Parrot is currently pre-alpha
software. So don't expect to do useful work with it yet." and apparently
it was touched for the last time some year and a half ago.  It sounds like
something for a pretty distant future or the URL above is obsolete?

 Michal


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

Date: Sun, 08 Apr 2001 17:55:55 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: what are the new languages?
Message-Id: <fc91dtg2tvdl9kg01vbu52mkkt7cmrh6h4@4ax.com>

Dmitry Epstein wrote:

>I tried installing the IDE, but right away the installer warned me that
>the program won't work with directories that have spaces in them.  What
>the hell?!  I've never seen this before.

You're not used to much, then. The same restriction pretty much applies
to perl itself.

>If it can't even work
>correctly in Windoze environment, why would I need such crap?

Spaces in file paths is an afterthought in Windows. Making it work
requires a hack: putting quotes around the file path. If there already
were quotes around the path, you're in trouble...

The geek reply would be: spaces in file names are for lusers.  :-)

Fact is: many, even great, programs, fall over them. Some of them are
flagships of the Microsoft stable.

-- 
	Bart.


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

Date: 8 Apr 2001 18:34:38 GMT
From: me@nospam.com (Me)
Subject: Re: Windows but not UNIX!?
Message-Id: <Xns907D760015410mememeyeahme@206.165.3.80>

"Plastic Fantastic" <grahamANTISPAMMING@nme.com> wrote in
<GKlz6.1009$cF4.149674@news6-win.server.ntlworld.com>: 


>Any ideas?

Yes, there's a problem somewhere in the script.  Fix it and that should 
clear up your problems.


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

Date: Sun, 08 Apr 2001 20:22:03 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Windows but not UNIX!?
Message-Id: <rvh1dtktfva51akbt1jkqi56sjfhn4lc32@4ax.com>

Plastic Fantastic wrote:

>ive written a perl script which works fine when I run it through the Windows
>port of perl (perl.exe). When I try to run it through UNIX however, it
>reports some syntax errors and wont run.

Check the perl versions. Perhaps you're using too new features for one
of them.

Or perhaps, as someone else suggested, you've used the wrong FTP mode.

>I dont use the -w switch either
>time btw.

Why not? It catches errors that can cause
hard-to-track-down-in-any-other-way bugs. So does "use strict". But
unlike "strict", you won't ever get fatal errors for using it.

-- 
	Bart.


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

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


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