[18485] in Perl-Users-Digest
Perl-Users Digest, Issue: 653 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 8 11:05:34 2001
Date: Sun, 8 Apr 2001 08:05:09 -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: <986742309-v10-i653@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 8 Apr 2001 Volume: 10 Number: 653
Today's topics:
Re: ? The best Perl book ? (Steven Smolinski)
Re: Any way to ignore white space characters? <bmb@ginger.libs.uga.edu>
Re: can somebody explain (Steven Smolinski)
Re: complaint about moderation of this group (Tad McClellan)
Re: complaint about moderation of this group (Tad McClellan)
Re: complaint about moderation of this group (Tad McClellan)
Re: Copying Directories <abe@ztreet.demon.nl>
Re: deleting files <gellyfish@gellyfish.com>
Making a dir on a Win2000 server <mess@dds.nl>
Re: Perl + SFTP method? <nospam@please.com>
Perl job, $ ? <janoleolsen@hotmail.com>
Re: Radius detail File to csv <bmb@ginger.libs.uga.edu>
Re: So what do YOU use Perl for? <wayne.keenan@ntlworld.com>
Re: So what do YOU use Perl for? <bmb@ginger.libs.uga.edu>
Re: System commands in script <gellyfish@gellyfish.com>
Touch <Waarddebon@chello.nl>
Re: Touch <tony_curtis32@yahoo.com>
Re: Touch <gtoomey@usa.net>
Re: win32: *.pl > *.exe howto <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 08 Apr 2001 14:09:56 GMT
From: sjs@linux.ca (Steven Smolinski)
Subject: Re: ? The best Perl book ?
Message-Id: <slrn9d119b.hk.sjs@ragnar.stevens.gulch>
Ciaran McCreesh <keesh@users.pleaseremovethisbit.sourceforge.net> wrote:
>
> [...] I've yet to see a decent Perl book published by anyone other
> than O'Reilly [...]
It seems this issue comes up fortnightly. I think you're wrong on both
sides: O'Reilly has some dogs and there are great books by other
publishers. Search the archives of this newsgroup to find lots of good
suggestions.
Just to prove the point, here's a short, non-exhaustive list of
excellent non-O'Reilly Perl titles from my own library:
- Elements of Programming with Perl, Andrew Johnson, Manning
- Network Programming with Perl, Lincoln Stein, Addison-Wesley
- Object Oriented Perl, Damian Conway, Manning
I would buy anything these authors wrote about Perl, no matter the
publisher (of course I urge them to go to O'Reilly--I like their binding
best, and Manning's cover design is ludicrous).
Steve
--
Steven Smolinski => http://www.steven.cx/
------------------------------
Date: Sun, 8 Apr 2001 09:41:04 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Any way to ignore white space characters?
Message-Id: <Pine.A41.4.21.0104080938000.16038-100000@ginger.libs.uga.edu>
Following was my answer in alt.perl. If you're going to cross-post, you
should cross-post. My assumption is that the OP isn't asking to ignore \n
but rather to ignore blank lines. Otherwise I couldn't make sense of it.
On Sat, 7 Apr 2001, Preston Price wrote:
> This is my problem. I have a file that I want to read certain file names
> from to load into a stack. Then after the stack is built and manipulated I
> want to print names back to the file. What happens is that when I print them
> back to the file I put a "\n" after it so that I can read the files back in
> line by line in later executions. However after about 3 runs the program is
> shot because when I read the files back in they have the "\n" at the end of
> them so I end up with big spaces in my file when I write the file names back
> to the file.
One solution is not to print the blank lines back to the file. Just print
the lines that aren't null strings.
> After about 3 runs it would look like this:
> file3
>
>
> file2
>
> file1
>
> If anyone knows how to ignore the "\n"s when reading in I would greatly
> appreciate it!
1 #!/usr/local/bin/perl
2 use warnings;
3 use strict;
4
5 while(<DATA>){
6 next if /^$/;
7 print
8 }
9
10 __DATA__
11 file3
12
13
14 file2
15
16 file1
17
Brad
------------------------------
Date: Sun, 08 Apr 2001 13:40:58 GMT
From: sjs@linux.ca (Steven Smolinski)
Subject: Re: can somebody explain
Message-Id: <slrn9d0vj2.hk.sjs@ragnar.stevens.gulch>
Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "SS" == Steven Smolinski <sjs@linux.ca> writes:
>
> SS> The =~ is the matching operator. See the perlop manpage. [...]
>
> better called the binding operator. [...]
Indeed; thanks for the correction. The manpage I pointed to also calls
it the binding operator, and has for many moons, if not forever.
I can't figure out where I got "matching operator" from.
Steve
--
Steven Smolinski => http://www.steven.cx/
------------------------------
Date: Sun, 8 Apr 2001 09:04:49 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: complaint about moderation of this group
Message-Id: <slrn9d0ofh.v4m.tadmc@tadmc26.august.net>
Scott <admin@gatordev.net> wrote:
>
>
>Michael Carman wrote:
>
>> Yes and no. If there were only a few messages here each day, then I
>> doubt that anyone would really mind seeing CGI questions. However, they
>> would still be off-topic.
>>
>> -mjc
>
>CGI scripts that are written in perl are not off topic.
Right.
And Michael did not say that CGI scripts that are written in perl
are off topic, so what on Earth are you talking about?
It is not the fact that the program is used in a CGI environment
that makes it off topic!
It is the nature of the *question*.
Michael was talking about "CGI questions", you seem to be talking
about "CGI scripts".
>A perl related question is on topic as long as it
>isn't about a perl script that is processed by a web server. That's totally
>ludicrous.
Sheesh.
Now you are talking about "CGI scripts" nor about "CGI questions".
Now you've switched to "Perl questions".
Disregarding the distinctions between those three is bound to lead
to misunderstandings. Which is what we have in this thread.
about "CGI scripts"? (could very well be on-topic)
about "Perl questions"? (on-topic)
about "CGI questions"? (off-topic)
about "sysadmin questions"? (off-topic)
about "human genome mapping questions? (off-topic)
about "stock quote questions"? (off-topic)
See any pattern to the "off topic" questions there?
They are all "about the application" that Perl is being used for (off topic),
rather than about Perl itself (on topic) or how to implement the
application-specific thing in Perl (on topic).
_What_ the "application-specific thing" should be is not a Perl
question, it is a question about the application's domain.
>I would say that most people using perl are using it for web
>related activities such as CGI scripts or mod_perl programs.
I doubt that that is true.
>If I had a CGI related question
Note that here you switch from discussing "perl related questions"
right past "CGI scripts" and back to discussing "CGI questions".
>I would post it here instead of to
>some low volume group where I am unlikely to get a reply.
Thank you for identifying yourself. I have made use of that information.
>Hence the name comp.lang.perl.misc. Miscellaneous; all the odds and ends of
>anything slightly perl related under the sun.
^^^^^^^^^^^^^
True, but "works different in IE and Netscape" (the question that
started this whole thread (yet appears in a _different_ thread!))
is NOT even "slightly" related to the programming language used
to write CGI programs.
So it _was_ off topic.
>Give me your weary, your weak, those with perl related questions, they will
^^^^^^^^^^^^
>likely be answered here.
Right!
But now you have swithed, yet again, back to "Perl questions".
No wonder there is so much confusion. You seem to have added to it
rather than helped to sort it all out...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 8 Apr 2001 09:40:07 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: complaint about moderation of this group
Message-Id: <slrn9d0qhm.v4m.tadmc@tadmc26.august.net>
---Pete--- <bogus@erol.com> wrote:
>On Sun, 8 Apr 2001 13:52:23 +1000, mgjv@tradingpost.com.au (Martien
>Verbruggen) wrote:
>
>>CGI programs are not offtopic as long as the issues discussed are Perl
>>issues. The CGI issues are offtopic. That is the point. It has nothing
>>to do with what the program is supposed to do, be it CGI, system admin
>>tasks, text parsing, or calculating the average number of raindrops in a
>>cumulus cloud. The Perl parts of all those prorgams are on-topic. The
>>non-Perl parts, i.e. the langiuage independent parts, are offtopic.
>>
>>What is so bloody hard to understand about that?
>--------
>Martien, to prove the point you made above , I challange
>you or anyone to copy and paste a section from the Perl
^^^^^^^^^^^^^
>docs
^^^^
Perl docs should document Perl.
Application area docs should document application area stuff.
There are a bazillion application areas where Perl can be (and is)
effectively employed.
>that explains the dividing line between CGI & Perl in
and between system admin and Perl.
and between text parsing and Perl.
and between calculating the average number of raindrops in a
cumulus cloud and Perl.
and between <everything else that can be done by a Turing complete
programming language> and Perl. ( and that is a *whole lot!* )
It is not up to the Perl docs to show the division. It is up to
the CGI "docs" (such as they are).
>a manner that would be (or should be) clearly understood
>by a person new to Perl.
^^^^^^^^^^^
If they are not "new to CGI" also, then they will already know
the dividing line.
It is not "new to Perl" that makes it pretty much required to
understand the basics of the CGI environment. There are boatloads
of "new to Perl" programmers who have no need of CGI.
It is "new to CGI" that must be overcome. You do _that_ with
CGI resources, not Perl resources.
Of course, the problem is compounded when the "new to CGI" and
"new to Perl" are simultaneous (as is very often the case).
The whole point that seems to be missed here is that Perl is
NOT responsible for anticipating every application area where
it is may be used. (even if the application area is "big")
>What's not 100% clear to me is why all the concern
Because we want to read about _Perl_ stuff in the Perl newsgroup.
If we wanted to read about CGI stuff, we would be reading the
CGI newsgroup.
That is why Usenet is divided up in to topics.
>because... comp.infosystems.www.authoring.cgi
>only gets about 20 posting per day <grin>.
1) seems the <grin> should be a <frown> for folks concerned with
getting help with CGI questions.
2) I figure the unhelpfulness of the CGI newsgroup is exactly
what happens when the rules of netiquette are largely ignored.
3) "all the concern" is that we don't want to see clp.misc suffer
the same fate.
"Rules of society" come from an evolutionary kind or process. Rules
that don't prove to provide more "benefit" than "cost" survive,
otherwise they don't.
What is left are things that have "proven to help" keep the discussion
continuing.
I have visited ciwag a couple of times, but didn't last long.
I perceived the cost of participating there as exceeding the
benefit.
It appears that many others have made a similar assessment.
Post enough FAQs and off-topic questions in clp.misc, and it too
will end up with 20 posts a day (or 200 questions and 0 answers,
or 200 questions and 20 wrong/misleading answers, or...).
There has, in fact, been a very significant "talent drain"
hereabouts already.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 8 Apr 2001 09:56:36 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: complaint about moderation of this group
Message-Id: <slrn9d0rgk.v4m.tadmc@tadmc26.august.net>
---Pete--- <bogus@erol.com> wrote:
>On Sun, 8 Apr 2001 13:52:23 +1000, mgjv@tradingpost.com.au (Martien
>Verbruggen) wrote:
>
>>CGI programs are not offtopic as long as the issues discussed are Perl
>>issues. The CGI issues are offtopic. That is the point. It has nothing
>>to do with what the program is supposed to do, be it CGI, system admin
>>tasks, text parsing, or calculating the average number of raindrops in a
>>cumulus cloud. The Perl parts of all those prorgams are on-topic. The
>>non-Perl parts, i.e. the langiuage independent parts, are offtopic.
>>
>>What is so bloody hard to understand about that?
>--------
>In theory, I agree with you. However, in my experience, it
>was not until after I purchsed a book on Perl and a book
>on CGI and reading various postings in this Perl NG and
>the CGI NG that I was able to see the dividing line.
>It took me several weeks and $100 in books before I
>was able to see the dividing line between Perl & CGI.
We are going to get off topic (eg. CGI questions) here, for
pretty much the reason you mention.
While annoying, it is understandable that it will happen.
A followup of "What is your Perl question?", "ask in a CGI newsgroup",
etc., or ignoring the article, or killfiling the poster can handle
those.
It is the whining subsequent to being told that it is off topic
that moves it from "annoying" to "enraging".
( "rage" because they are whining about being told that there are
better places to ask their question, yet they complain!
)
My personal scoring policy is to make no entry for asking an off-topic
question (unless repeatedly by the same person), -5000 if the OP whines
in response and -9998 for third party whiners.
>I'm just trying to explain why this might be an ongoing
>problem and to offer some possible solutions.
I think your "new to CGI and Perl at the same time" is indeed
the root cause of the problem. I don't see it ever getting fixed :-(
An effective solution (which I can feel becoming more attractive
at an increasing rate of late) is to stop reading clp.misc.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 08 Apr 2001 17:06:06 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Copying Directories
Message-Id: <dou0dt812lhud0viiaiflc82rm1tqdaaer@4ax.com>
[ Please put your response _after_ the trimmed text it relates to ]
On Fri, 6 Apr 2001 11:47:38 -0400, "Nathan Pertuset"
<npertuset@hotmail.com> wrote:
> "Phil Shean" <philip.shean@uwe.ac.uk> wrote in message
> news:3ACDDC03.21E875AA@uwe.ac.uk...
> > >
> > > > system("cp <dir> <dest>"); # no < >...
> >
> > So, example would be ....(NT system)
> >
> > system("copy c:\electures\m-evans\objects
> c:\electures\m-evans\old\objects");
> >
> > Is that correct?
> >
> that should work Phil....
No it won't, try (on cmd/command prompt):
perl -le "print \"c:\electures\m-evans\objects\""
To the OP:
Please start using normal slashes (the ones going forward :) in all your
paths.
Also look at:
perldoc File::Copy
--
Good luck, Abe
Amsterdam Perl Mongers http://amsterdam.pm.org
perl -e '$_=sub{split//,pop;print pop while@_};&$_("rekcah lreP rehtona tsuJ")'
------------------------------
Date: 8 Apr 2001 12:59:32 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: deleting files
Message-Id: <9apnbk$g38$3@neptunium.btinternet.com>
S Warhurst <bigusAT@btinternetdot.com> wrote:
> "T_Boss" <T_boss75@curanet.com> wrote in message news:pMoz6.130896$lj4.3976867@news6.giganews.com...
>> How can I delete files that are not in the same directory as the
>> perl script
>
> Wont...
>
> unlink "drive:/folder/file.ext";
>
> ...do the trick?
>
That all depends on whether the OS can understand the 'drive:/folder'
locution.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: Sun, 8 Apr 2001 15:17:48 +0200
From: "YJW" <mess@dds.nl>
Subject: Making a dir on a Win2000 server
Message-Id: <5yZz6.60054$t9.4137495@news.soneraplaza.nl>
Is it different to make a directory with perl on a Win2000 server then on a
Unix-server? Because the script did work on an account of Virtualave, but
since I use another server (that uses Win2000) it does not work anymore.
Please help me out. Thanks....
------------------------------
Date: Sun, 08 Apr 2001 13:35:02 GMT
From: "Eagle Web Services" <nospam@please.com>
Subject: Re: Perl + SFTP method?
Message-Id: <aOZz6.43220$Gn3.597812@dbsch1.home.nl>
Well,
first of all you need the Net::FTP package.
check www.cpan.org for that....
There'll be a manual for that aswell.
Also, if you're looking to rip stuff through http
try LWP.
Can also be found at www.cpan.org
--
___________________________________________________
Excellent HOSTING solutions starting at just $9.95 !!
Eagle Web Services
http://www.ewsnl.com/
"smilepak" <smilepak@hotmail.com> schreef in bericht
news:pQrz6.10348$Kr1.871431@newsread1.prod.itd.earthlink.net...
> I have a question, anyone know how to create a pl script that does sftp
pull
> from a remote site.
>
> For Example:
>
> username: user
> password: pass
> sftp address: sftp.mydomain.com
> directory: /pub/mydir/
> file: filename$date.txt
>
> How am I suppose to do an FTP connection via script and provide the
> username/password with it prompt
> for it?
>
> Haven't done this before so not sure on how to do it. Oh the basic perl
> scripting, I already know how.
> Just unsure how to structure the FTP command to provide the
> username/password and path and get when
> it ask for it.
>
> Thanx
> KN
>
>
>
------------------------------
Date: Sun, 8 Apr 2001 15:30:39 +0200
From: "Jan" <janoleolsen@hotmail.com>
Subject: Perl job, $ ?
Message-Id: <lKZz6.6987$NR.570106@news3.oke.nextra.no>
Are there any forums or sites where I can find someone who'd like to take on
some CGI programming? It's a form spanning two pages, with field
verification.
Details:
The first page:
* 11 digit (may start with zero), last digit is a control digit
* e-mail field (x@x.xx), will also accept an 8 digit number
* Saving normal system data (IP, IP-name, referrer, time, os, browser etc)
* Error message stating that field 1 or 2 are missing/incorrect
* Data is saved to a ";"-separated text file
* All faulty attempts should be saved, but error should be appended to the
line
Page two:
This page is an SSL protected page (i.e. another server).
The data from page 1 is saved with the results from page 2 (a second text
file).
* Phone number 1: 8 digits (cannot start with 0 or 1)
* Phone number 2: 8 digits (must start with 4 or 9)
* Postal code: 4 digits (0001-2000)
* Code: 4 digits
* Account: 11 digits (last digit control digit, any non-digits are deleted
prior to verification)
* Password: 10 characters, ****
* City: 10 characters
* Day: DD
* eBill: Y/N
* ads: Y/N
* Why-pulldown: ads, word of mouth, paper
The code on page 1 should be browser independent if possible. Please advise
if you prefer two logs to be merged, or if it's easy to have it all saved in
one file (stability).
All logs are saved to a password protected directory. The control digits
mentioned above use CDV10, it's the same as used for credit card numbers. I
could send submit the algoritm actually placing an order, but you may assume
this when estimating the hours and price for the assignment.
Option1: The file is encrypted (e.g. PGP), additonal cost and preferred
solution?
Option2: The referrer in page 1 remembers external referrer, i.e. if the
user browses locally before using the form, it shall use the external
referrer. What's your recommended solution, cookies? We do not expect to use
ASP (never experienced a fast ASP site), but may use Linux or NT4 (Interland
or dreamhost).
We may also require some string manipulation for merging logs, removing
doubles, converting flat files to delimited files, and generating
statistics. This could be somewhat complex. This has nothing to do with the
web site, but is a process run on Win2000 or Linux. Could this be of
interest, what do you suggest -- a C program?
All code should be commented in English.
------------------------------
Date: Sun, 8 Apr 2001 10:42:23 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Radius detail File to csv
Message-Id: <Pine.A41.4.21.0104081008550.16038-100000@ginger.libs.uga.edu>
On Sat, 7 Apr 2001, Uri Guttman wrote:
> >>>>> "BB" == Brad Baxter <bmb@ginger.libs.uga.edu> writes:
>
> some minor and style improvements
>
> BB> my %h = map { $_, '' } qw(
> Acct-Authentic
> Acct-Delay-Time
[snip]
> );
>
> isn't that easier to read and maintain?
Yes!
> BB> {
> BB> local $/ = ''; ### paragraph mode
> BB> while( <> ) {
> BB> my %newh = %h;
>
> why copy the whole hash over? you can just clear its values
>
> @h{ keys %h } = () ;
> or
> @h{ keys %h } = ('') x keys %h ;
>
> to set them all to null strings
I think I was just being lazy and figuring that the cost was small in this
case.
> BB> foreach ( split "\n" ) {
> BB> if( /\s*(\S+)\s*=\s*(.*)/ ) {
> BB> my ( $name, $value ) = ( $1, $2 );
>
> do the assignment in the if clause
>
> if( my ( $name, $value ) = /\s*(\S+)\s*=\s*(.+)/ ) {
>
> i changed the .* to .+ .
>
> you could convert the foreach/split as well
>
> while( my ( $name, $value ) = /^\s*(\S+)\s*=\s*(.+)/gm ) {
>
> this assumes each key=value pair starts on it own line which seems to be
> what you were doing.
That results in an infinite loop (because it's not in scalar context?)
However, I get the point. I modified it in the code at the end of this
post.
> BB> $value =~ s/"/\\"/g;
> BB> $newh{ $name } = $value;
> BB> } # if
> BB> } # foreach
>
> with deeper nesting, you wouldn't need to comment close braces. 2 char
> indents are cheap. use 4 or 8. those comments are noisy
I used to run out of screen space with tabstop=4, so I started using 2 and
am now very used to it. I indent with tabs, so others who edit my code
will see what they like. Of course, I have to encourage them to indent
with tabs also. The '} #' comments are a habit I've gotten into. I tend
to leave them in place, because my blocks often span pages (and because
uncommented '}'s tend to make me cross-eyed :-). I'm not arguing with
you--just my preferences. And I'll grant that they're preferences that
grew out of poor programming style. :-)
> BB> print '"', join( '","', map {$newh{$_}} sort keys %newh ), "\"\n";
>
> hmm, there are MANY ways to print a sorted hash. that is one of the
> uglier ones. also there is no need for the map as a hash slice will do
> fine. does the value have to have "" around it?
TMTOWTDIU? That means I agree with you!
I doubt the value has to have "" around it if it contains no commas or
'"'s, but it's easier to code that way, and the OP did say 'simple'.
> how about this one:
>
> { local $" = q{","} ;
>
> print qq{"@newh{sort keys %newh}"\n} ;
> }
>
> i think that is a lot clearer.
I do too.
This sort of reply is one of the main reasons I try hard to stick with
this news group. I find these discussions, even when I'm not involved,
invaluable to improving my own skills.
In the version below, I added a 'die' to ensure that no extra fields get
processed unintentionally.
### insert hash assignment here
{ local $/ = ''; ### paragraph mode
while( <> ) {
while( /^\s*(\S+)\s*=\s*(.+)$/gm ) {
my ( $name, $value ) = ( $1, $2 );
die "Unknown field: $name" unless exists $h{ $name };
$value =~ s/"/\\"/g;
$h{ $name } = $value;
}
{ local $" = q{","} ;
print qq{"@h{sort keys %h}"\n} ;
}
@h{ keys %h } = ('') x keys %h ;
}
}
Many thanks,
Brad
------------------------------
Date: Sun, 08 Apr 2001 15:13:07 +0100
From: "wayne.keenan" <wayne.keenan@ntlworld.com>
Subject: Re: So what do YOU use Perl for?
Message-Id: <3AD071F3.9DD526E2@ntlworld.com>
write arcade games.
http://www.metaverse.fsnet.co.uk/sdlpl/screenshots/screenshots.html
http://sdlpl.sourceforge.net
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.
------------------------------
Date: Sun, 8 Apr 2001 10:46:40 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: So what do YOU use Perl for?
Message-Id: <Pine.A41.4.21.0104081044551.16038-100000@ginger.libs.uga.edu>
On Sun, 8 Apr 2001, Gwyn Judd wrote:
> I was shocked! How could Szilvia Oszko <soszko@gmu.edu>
> say such a terrible thing:
> >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.
>
> I use it to impress women.
I use it to make the folks who write my paycheck think I'm a genius.
Please don't set them straight.
Brad
------------------------------
Date: 8 Apr 2001 14:03:54 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: System commands in script
Message-Id: <9apr4a$l3j$1@neptunium.btinternet.com>
Ludmilla Markowska <ludmilla.markowska@gmx.net> wrote:
> Hi all,
> i try to write a webformular to administer our cyrus-imap server. now my
> question is how to make system commands like "cyradm localhost" accessible
> via a perl-script.
>
I would read about system() in the perlfunc manpage. I would also suggest
you read the perlsec manpage and understand it fully before you set out
on the is enterprise.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: Sun, 08 Apr 2001 14:34:33 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: Touch
Message-Id: <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
------------------------------
Date: 08 Apr 2001 09:54:35 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Touch
Message-Id: <873dbjigr8.fsf@limey.hpcc.uh.edu>
>> On Sun, 08 Apr 2001 14:34:33 GMT,
>> "Waarddebon" <Waarddebon@chello.nl> said:
> 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
Perl doesn't have a "touch" function:
$ perldoc -f touch
No documentation for perl function `touch' found
Were you trying to run the external shell command touch(1)?
perldoc -f system
perldoc perlipc
But the perlish solution you're looking for is:
perldoc -f utime
hth
t
--
Just reach into these holes. I use a carrot.
------------------------------
Date: Mon, 9 Apr 2001 01:00:45 +1000
From: "Gregory Toomey" <gtoomey@usa.net>
Subject: Re: Touch
Message-Id: <oR_z6.11828$45.67492@newsfeeds.bigpond.com>
Touch is a Unix command.
You are programming in Perl. Lookup utime.
Would you speak to an Eskimo in Swahili?
gtoomey
-------------
"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
>
>
------------------------------
Date: 8 Apr 2001 13:01:32 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: win32: *.pl > *.exe howto
Message-Id: <9apnfc$g38$4@neptunium.btinternet.com>
alexander gausa <alexander.gausa@gmx.de> wrote:
> hi!
> i want to generate an exe-file from an pl-file.
>
renaming the file works for me.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
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 653
**************************************