[18490] in Perl-Users-Digest
Perl-Users Digest, Issue: 658 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 9 09:05:38 2001
Date: Mon, 9 Apr 2001 06:05:12 -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: <986821512-v10-i658@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 9 Apr 2001 Volume: 10 Number: 658
Today's topics:
Re: complaint about moderation of this group <webmaster@webdragon.unmunge.net>
Re: complaint about moderation of this group <webmaster@webdragon.unmunge.net>
Re: complaint about moderation of this group <webmaster@webdragon.unmunge.net>
cookies and perl <gglackin@nospam.eircom.net>
Re: Copying Directories (Tad McClellan)
Re: Criticism (searching a syslog) (Tad McClellan)
Re: deleting files <T_boss75@curanet.com>
Re: deleting files <T_boss75@curanet.com>
FAQ .: Every post to the comp.lang.perl.misc newsgroup <faq@denver.pm.org>
How to get perl to count POD lines <boris.lenhard@cgr.ki.se>
Re: How to get perl to count POD lines (Anno Siegel)
Re: Posting Guidelines (was Re: Does this newsgroup hav <paul.groves@oucs.ox.ac.uk>
Re: Return code for % operator <bernie@fantasyfarm.com>
Re: So what do YOU use Perl for? (Anno Siegel)
Re: To Perl Or Not To Perl (Re: Why Perl?) (John Klassa)
Re: tr question <han.yuen.ong@intel.com>
Re: tr question (Bernard El-Hagin)
Re: tr question (Anno Siegel)
Re: tr question (Bernard El-Hagin)
Re: tr question (Bernard El-Hagin)
Re: White Space Characters (Anno Siegel)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 9 Apr 2001 12:27:33 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: complaint about moderation of this group
Message-Id: <9as9rl$m0m$0@216.155.33.105>
In article <slrn9d0qhm.v4m.tadmc@tadmc26.august.net>,
tadmc@augustmail.com (Tad McClellan) wrote:
|
| There has, in fact, been a very significant "talent drain"
| hereabouts already.
Which is unfortunate, as I've been attempting to get some answers to a
DBD::CSV problem I'm having where a program is generating around 7300
"use of uninitialized value" warnings into the ISP weblogs every time
the .cgi gets hit. (It's definitely not a cgi problem -- I've tracked
the offending code down, but still can't grok it well enough to either
patch it or offer a solution to the author. :/
I even responded to my own post in an effort to 'keep it visible'
longer, and still had no response.
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: 9 Apr 2001 12:37:08 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: complaint about moderation of this group
Message-Id: <9asadk$m0m$1@216.155.33.105>
In article <x7snjipk93.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
| we have no restrictions on who can participate here. we do have certain
| rules on how they can. there is a big difference. i have seen many
| newbies here over the years stick around, learn more perl, start to
| answer questions and become regulars. it is the hit and run newbie
| attacks and whines that get annoying.
|
| uri
*chuckle* I suppose I'm one of the lucky few that managed to outgrow
that -- took a bit of effort. I'm still enjoying the heck out of
learning this stuff, and there's easily no way I would have progressed
as far or as fast without this group helping to critique my style and
conceptual ideas.
I'm still a far cry from expert or guru, But I feel fairly confident
I've reached at least the 'intermediate' level. ;-) *whistling
innocently*
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: 9 Apr 2001 12:44:04 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: complaint about moderation of this group
Message-Id: <9asaqk$m0m$2@216.155.33.105>
In article <slrn9d0rgk.v4m.tadmc@tadmc26.august.net>,
tadmc@augustmail.com (Tad McClellan) wrote:
| 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 :-(
While I'm very happy to see the [perl] FAQ autoposter, I still am of a
mind that we need a visible [comp.lang.perl.misc] FAQ for the _group_
autoposted here as well. I've already set my newsreader to 'flag' and
'subtly highlight' the autoposter, so I can quickly skim the titles and
skip the stuff I already know, and skim the stuff I don't, exploring
further as necessary. :) While there are links in the auto-perl-faq to
stuff about the group, IIRC, it might be a better idea to separate them
further. Those of us here already wouldn't have any problem filtering it
appropriately.
| An effective solution (which I can feel becoming more attractive
| at an increasing rate of late) is to stop reading clp.misc.
That *would* be unfortunate, Tad. I've learned a great deal from
watching your responses to questions that have been out of my league, or
area of expertise.
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: Mon, 9 Apr 2001 14:00:28 +0100
From: "Bob Smith" <gglackin@nospam.eircom.net>
Subject: cookies and perl
Message-Id: <TniA6.7062$_W2.7575@news.indigo.ie>
Hi,
I am writing a cookie based application to build up stats/profiles on
visitors to our sites. The problem is that if cookies have been disabled
then I end up recording a new session entry for every page visited.
Is there any way to detect if a browser has cookies disabled??.
I have tried to set a cookie and then immediately try to read it. but it
always exists - regardless of cookies being available or not. Re-directing
to another page is not an option, as this code is required on every
page.
any ideas?
Thanks
Bob
------------------------------
Date: Mon, 9 Apr 2001 07:47:50 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Copying Directories
Message-Id: <slrn9d38b6.ot.tadmc@tadmc26.august.net>
Phil Shean <philip.shean@uwe.ac.uk> wrote:
>> No it won't, try (on cmd/command prompt):
>>
>> Please start using normal slashes (the ones going forward :) in all your
>> paths.
>
>That's not strictly true. I made an error on my example though.
>
>On an NT System, you need to use double back slashes. Well, at least with IIS 5
>and active perl 5.6!
I doubt that that is true.
Got some code that shows what you are talking about?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 9 Apr 2001 07:51:04 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Criticism (searching a syslog)
Message-Id: <slrn9d38h8.ot.tadmc@tadmc26.august.net>
John Doe <joeybach@127.0.0.1> wrote:
>This is my first real script. I am new to programing in general and just
>starting with perl. I do not know anyone else locally who is into perl
>who can add input suggest other methods or who can just tell me it sucks.
perl itself can do some of that for you, if you ask it to.
>(Especially with the knowledge of people in this group.) So any criticism
>is welcomed.
>My script is:
>
>#!/usr/bin/perl
You should _first_ get all the critiques you can get from a
machine, and clean them up before you ask people to bother
reviewing it.
You ask perl to critique your programs by starting every single
one of them with:
#!/usr/bin/perl -w
use strict;
Please add that, clean up the messages, and post again.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 9 Apr 2001 08:40:21 -0400
From: "T_Boss" <T_boss75@curanet.com>
Subject: Re: deleting files
Message-Id: <37iA6.138052$lj4.4224040@news6.giganews.com>
I have tried it, and i get a syntax error.
I'm working on Win NT 4.0
"Jonathan Stowe" <gellyfish@gellyfish.com> wrote in message
news: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: Mon, 9 Apr 2001 08:53:52 -0400
From: "T_Boss" <T_boss75@curanet.com>
Subject: Re: deleting files
Message-Id: <JjiA6.138068$lj4.4224781@news6.giganews.com>
I used
chdir 'path';
unlink(filename);
and now it's working, thanks.
"Jonathan Stowe" <gellyfish@gellyfish.com> wrote in message
news: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: Mon, 09 Apr 2001 12:17:02 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ .: Every post to the comp.lang.perl.misc newsgroup consumes the time and
Message-Id: <2LhA6.738$T3.189940736@news.frii.net>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.
+
Every post to the comp.lang.perl.misc newsgroup consumes the time and
effort of readers all over the world who pay for their Internet access
just as you do. That's OK, because mutual support is what USENET is
all about. But it only works if posters check out other resources
first!
Please make an effort to find the answer to your question on your own
before posting. The resources below will help you.
BEFORE you post to this newsgroup, look at the following checklist:
1. The latest stable release of Perl is 5.6.0. The latest maintenance
release of the 5.004 track is 5.004_05, for the 5.005 track is
5.005_03. You can download them from
http://www.cpan.org/src/
(look in ftp://ftp.perl.com/perl/ for a list of FTP-based mirrors)
2. comp.lang.perl.misc is for questions on the Perl language. Try
comp.infosystems.www.authoring.cgi for questions on the CGI part of
CGI scripts. The two leading blocks of reusable code for CGI purposes
are CGI.pm, at
http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
and cgi-lib.pl, at
http://cgi-lib.berkeley.edu
You might also want to check out libwww-perl at
http://www.linpro.no/lwp/
If you are having problems with a CGI script, look through
http://language.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
3. Are you using the following?
#!/usr/bin/perl -w
use diagnostics;
use strict;
"-w" turns on all sorts of warnings about probable errors (see the
perldiag manpage), "use diagnostics" causes the "-w" warnings to be
explained in greater detail (with the explanations from the perldiag
manpage), and "use strict" generates compile and run-time errors for
certain unsafe variable, reference and subroutine constructs (see the
strict manpage)
4. Are you checking the return values from the functions built in to
perl? Most of the file and system functions set $! and have return
values that you can test thus:
open(PASSWD, "</etc/passwd") or
die "error opening /etc/passwd: $!\n";
$! will contain an error message that will give you more information
on where your program is going wrong. The perlfunc man page will give
you more information on the return values from functions.
5. Have you read the Perl FAQ? Many questions on sockets programming,
an important and common problem with Solaris, text manipulation and
the jargon of perl are answered in the FAQ. As well as being posted
regularly to comp.lang.perl.misc, the FAQ is on the web at:
http://language.perl.com/faq/
6. Have you read the man pages? Here are some subjects and the man
pages to look in:
Objects perltoot, perlref, perlmod, perlobj, perltie
Data Structures perlref, perllol, perldsc
Modules perlmod, perlsub
Regexps perlre, perlfunc, perlop
http://www.perl.com/CPAN/doc/FMTEYEWTK/index.html
(not a man-page but still useful)
Moving to perl5 perltrap, perl
Linking w/C perlxstut, perlxs, perlcall, perlguts, perlembed
The man page for "perltoc" provides a crude table of contents for the
perl man page set.
7. Have you looked at http://www.perl.com ? This is a great
online reference, with documentation, pointers to modules in the
Comprehensive Perl Archive Network (CPAN), articles on the inner
workings of many bits of Perl, and more.
7.5. Have you checked to see if a Perl module satisfies your needs?
Many reusable modules are available for immediate download and use.
See http://www.perl.com/CPAN/modules/00modlist.long.html for details.
8. Have you tried archives of Usenet? http://www.dejanews.com/
maintains an archive of postings to Usenet dating from March, 1995.
Be sure to include "Perl" in your search.
9. The latest version of the "Camel Book" ("Programming Perl"),
updated for version 5.6.0, is available from your bookstore or from
http://www.ora.com/
10. Remember, USENET newsgroups are based on the idea of mutual aid.
USENET only works if we put as much into it as we get out of it. Good
luck with your Perl work.
-Nathan Torkington, Perl mini-FAQ maintainer
-
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep comming up. If you are some how irritated by
seeing these postings you are free to ignore them or add the sender
to your killfile. If you find errors or other problems with these
postings please send corrections or comments to the posting email
address.
If you are not able to find this or other Perl documentation from
your installation you may access it via the web by following the
appropriate links from one of the addresses listed below.
http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search
http://www.perldoc.com
http://www.cpan.org
http://www.perl.com
Answers to questions about LOTS of other stuff, mostly not related to
Perl, can be found at
news:news.answers
and in the many thousands of other useful Usenet news groups.
Please note that the FAQ text posted by this server has been modified
from that distributed in the stable Perl release. It has been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ is available on request.
The perlfaq manual pages contain the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-1999 Tom Christiansen and Nathan
Torkington. All rights reserved.
When included as an integrated part of the Standard
Distribution of Perl or of its documentation (printed or
otherwise), this work is covered under Perl's Artistic
License. For separate distributions of all or part of
this FAQ outside of that, see the perlfaq manpage.
Irrespective of its distribution, all code examples here
are public domain. You are permitted and encouraged to
use this code and any derivatives thereof in your own
programs for fun or for profit as you see fit. A simple
comment in the code giving credit to the FAQ would be
courteous but is not required.
This work is provided in the hope that it will be useful but does
not represent a commitment of any kind on the part of the contributers,
authors or their agents.
--
This space intentionally left blank
------------------------------
Date: Mon, 09 Apr 2001 14:30:43 +0100
From: Boris Lenhard <boris.lenhard@cgr.ki.se>
Subject: How to get perl to count POD lines
Message-Id: <3AD1B983.F33553D4@cgr.ki.se>
Sorry if it is a stupid question..
I am trying to document my code using POD as I write it, but the line
numbers in perl error messages do not match those in Emacs because perl
interpreter does not count the POD lines.
Is there an easy way to get perl to count POD lines as well in the
source when reporting errors?
Thanks,
Boris
------------------------------
Date: 9 Apr 2001 13:03:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to get perl to count POD lines
Message-Id: <9asbuc$13q$1@mamenchi.zrz.TU-Berlin.DE>
According to Boris Lenhard <Boris.Lenhard@cgr.ki.se>:
> Sorry if it is a stupid question..
>
> I am trying to document my code using POD as I write it,
Very laudable.
> but the line
> numbers in perl error messages do not match those in Emacs because perl
> interpreter does not count the POD lines.
It doesn't? In which way? Are you running a current Perl? For me,
line numbers in errors and warnings (as well as __LINE__) indicate
the line number including any POD lines that may precede.
Or is it Emacs being super-clever and not counting the POD lines?
> Is there an easy way to get perl to count POD lines as well in the
> source when reporting errors?
The rarely used #line directive (described in perlsyn) influences
what Perl thinks the current line number is, but I don't think you
need it.
Anno
------------------------------
Date: Mon, 9 Apr 2001 13:38:08 +0100
From: "Paul Groves" <paul.groves@oucs.ox.ac.uk>
Subject: Re: Posting Guidelines (was Re: Does this newsgroup have an FAQ?)
Message-Id: <9asadr$o7p$1@news.ox.ac.uk>
"Michel Dalle" <michel.dalle@usa.net> wrote in message
news:9aknsq$1bi$1@news.mch.sbs.de...
> In article <slrn9crd8o.lp0.tadmc@tadmc26.august.net>, tadmc@augustmail.com
wrote:
> >It is (for now) available on my personal web site:
> >
> > http://www.augustmail.com/~tadmc/clpmisc_guide/
> >
> >It will soon be available on some pm.org web page.
>
> Suggestion : explain in a bit more detail *how* people
> are supposed to "check the Perl FAQ" and "check the
> other standard Perl docs".
Seconded.
Also under "Social faux pas to avoid" perhaps you should add "Do not ask
where the FAQ is" (even if you genuinely didn't know, but wanted to avoid
asking a FAQ) otherwise someone will be condescending and sarcastic to
you...
Paul
> Otherwise, quite good :)
>
> Michel.
------------------------------
Date: Mon, 09 Apr 2001 08:13:09 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: Return code for % operator
Message-Id: <5m93dt06v0sgac8mr3bb7vvtu7s83jggcu@news.supernews.net>
tadmc@augustmail.com (Tad McClellan) wrote:
} hue micheal <huem@MailAndNews.com> wrote:
} >My first thought, the following were correct:
} >if (100%4) { print "100 is dividible by 4" }
} >if (!(101%4)) { print "101 is not divisible by 4" }
} >
} >results: Nothing is printed !!!
}
} >I my opinion, the first case is more acurate ?
} ^^^^^^^
}
} There are no "opinions" in rudimentary mathematics.
Until you get into the question of how 'remainder' should work with
negative operands..:o)
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: 9 Apr 2001 12:07:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: So what do YOU use Perl for?
Message-Id: <9as8lc$rhq$2@mamenchi.zrz.TU-Berlin.DE>
According to Bart Lateur <bart.lateur@skynet.be>:
> Szilvia Oszko wrote:
[uses of Perl]
> Perl. I wouldn't think of using it to write a text editor, for example.
Though, if you were on a desert island and a crocodile came along
saying: Write me an editor in Perl or I'll eat your leg, Tk::Text
would come to the rescue. It gives you a reasonable text editor for
(almost) free.
Anno
------------------------------
Date: Mon, 09 Apr 2001 12:44:17 -0000
From: klassa@cisco.com (John Klassa)
Subject: Re: To Perl Or Not To Perl (Re: Why Perl?)
Message-Id: <slrn9d3bj0.rlo.klassa@klassa-u5.cisco.com>
On Sat, 7 Apr 2001 14:07:12 +0000 (UTC), Abigail <abigail@foad.org> wrote:
> Cons: ...
> perl6
Interesting... Why the "con" on perl6?
------------------------------
Date: Mon, 9 Apr 2001 18:10:20 +0800
From: "hong1" <han.yuen.ong@intel.com>
Subject: Re: tr question
Message-Id: <9as1qf$6ai@news.or.intel.com>
I think 'chomp' is the command to use if you just want to cut the whitespace
behind the string....
"Sven Buggermann" <buggerma@de.ibm.com> wrote in message
news:9arsd0$s02$1@news.btv.ibm.com...
> Hi ,
> i want to cut of whitespaces at the end of a string
> eg
>
> "sdgsf sdfr ewef.............."
> .... = whitespaces
> i want to have
> "sdgsf sdfr ewef"
>
> can someone tell me how to do do that ?
> thx in advance
> Sven
>
>
>
------------------------------
Date: Mon, 9 Apr 2001 11:22:55 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: tr question
Message-Id: <slrn9d36rl.7bv.bernard.el-hagin@gdndev32.lido-tech>
[fixed stupid jeopardy quote]
On Mon, 9 Apr 2001 18:10:20 +0800, hong1 <han.yuen.ong@intel.com> wrote:
>"Sven Buggermann" <buggerma@de.ibm.com> wrote in message
>news:9arsd0$s02$1@news.btv.ibm.com...
>> Hi ,
>> i want to cut of whitespaces at the end of a string
>> eg
>>
>> "sdgsf sdfr ewef.............."
>> .... = whitespaces
>> i want to have
>> "sdgsf sdfr ewef"
>>
>> can someone tell me how to do do that ?
>> thx in advance
>> Sven
>
>I think 'chomp' is the command to use if you just want to cut the whitespace
>behind the string....
You think wrong. That's not what chomp does.
perldoc -f chomp
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: 9 Apr 2001 11:24:16 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: tr question
Message-Id: <9as650$nq8$1@mamenchi.zrz.TU-Berlin.DE>
[reply moved where it belongs, after the trimmed quote]]
According to hong1 <han.yuen.ong@intel.com>:
> "Sven Buggermann" <buggerma@de.ibm.com> wrote in message
> news:9arsd0$s02$1@news.btv.ibm.com...
> > Hi ,
> > i want to cut of whitespaces at the end of a string
> > eg
> >
> > "sdgsf sdfr ewef.............."
> > .... = whitespaces
> > i want to have
> > "sdgsf sdfr ewef"
> I think 'chomp' is the command to use if you just want to cut the whitespace
> behind the string....
Please, if you give advice, at least take the time to look up what
you suggest. The documentation of chomp() would have told you at
a glance that it does no such thing. Typing out a wild guess only
wastes everybody's time.
Anno
------------------------------
Date: Mon, 9 Apr 2001 11:24:42 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: tr question
Message-Id: <slrn9d36v1.7bv.bernard.el-hagin@gdndev32.lido-tech>
On Mon, 9 Apr 2001 10:40:35 +0200, Sven Buggermann <buggerma@de.ibm.com>
wrote:
>Hi ,
>i want to cut of whitespaces at the end of a string
>eg
>
>"sdgsf sdfr ewef.............."
>.... = whitespaces
>i want to have
> "sdgsf sdfr ewef"
>
>can someone tell me how to do do that ?
This is not a tr question, but don't be sad, because this *is* a FAQ.
perldoc -q 'whitespace'
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: Mon, 9 Apr 2001 11:28:49 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: tr question
Message-Id: <slrn9d376n.7bv.bernard.el-hagin@gdndev32.lido-tech>
On Mon, 9 Apr 2001 11:24:42 +0000 (UTC), Bernard El-Hagin
<bernard.el-hagin@lido-tech.net> wrote:
>On Mon, 9 Apr 2001 10:40:35 +0200, Sven Buggermann <buggerma@de.ibm.com>
>wrote:
>>Hi ,
>>i want to cut of whitespaces at the end of a string
>>eg
>>
>>"sdgsf sdfr ewef.............."
>>.... = whitespaces
>>i want to have
>> "sdgsf sdfr ewef"
>>
>>can someone tell me how to do do that ?
>
>This is not a tr question, but don't be sad, because this *is* a FAQ.
>
>perldoc -q 'whitespace'
Actually, just:
perldoc -q 'space'
is correct.
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: 9 Apr 2001 12:40:11 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: White Space Characters
Message-Id: <9asajb$t2r$1@mamenchi.zrz.TU-Berlin.DE>
According to Philip M. Gollucci <philip@p6m7g82k.student.umd.edu>:
> You need to run chop($filename)
> #!/usr/bin/perl -w
>
> use strict;
[...]
Hmmm, looks like you are answering to someone, but you don't quote
anything, nor give a reference. Jeopardy posting is one extreme,
this is another.
Uri has already pointed out the shortcomings of your approach. One
question remains: What is it good for? Your program would print the
contents of the file $file on a single line.
Oh, and this:
> print "IUnable to delete $file" if $@;
^^^^
I didn't expect to see one of those in the wild again :)
Anno
------------------------------
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 658
**************************************