[16347] in Perl-Users-Digest
Perl-Users Digest, Issue: 3759 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 20 14:10:38 2000
Date: Thu, 20 Jul 2000 11:10:26 -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: <964116626-v9-i3759@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 20 Jul 2000 Volume: 9 Number: 3759
Today's topics:
Re: how to convert "1.2.3.10" to "01020310"? <jcook@strobedata.com>
Re: humbly parsing Perl jdimov@cis.clarion.edu
Re: I was wondering if someone will script me a cgi lad <gellyfish@gellyfish.com>
inheritance of properties ? <e.bras@hccnet.nl>
Re: inheritance of properties ? nobull@mail.com
Re: inheritance of properties ? <e.bras@hccnet.nl>
Re: inheritance of properties ? <care227@attglobal.net>
Re: inheritance of properties ? <sariq@texas.net>
Re: Insecure $ENV{PATH} while running setuid nobull@mail.com
Re: Intelligent "chomp" ? <gellyfish@gellyfish.com>
Re: looking for a ODP or yahoo style database <gellyfish@gellyfish.com>
Re: Looking for http module tltt@my-deja.com
LWP::UserAgent Part of Response Missing <declan@chello.nl>
Re: Matts Script Archive - A critique <ralawrence@my-deja.com>
Re: Matts Script Archive - A critique <ralawrence@my-deja.com>
Re: Matts Script Archive - A critique <gellyfish@gellyfish.com>
Re: Matts Script Archive - A critique <callgirl@la.znet.com>
Re: Matts Script Archive - A critique <gellyfish@gellyfish.com>
Re: Matts Script Archive - A critique (Malcolm Ray)
Microsoft Access <alemorphyNOalSPAM@hotmail.com.invalid>
Re: multiline regex <xsNOxsSPAM@korekom.com.invalid>
Net::FTP to delete multiple files <kaweed@micron.com>
New to Perl, How to call script and check when finished <gdonovanNOgdSPAM@jeffco.k12.co.us.invalid>
Newbie Question <mouimet@direct.ca>
Re: Newbie: how to split one string to many where there <mike@cyborg-group.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 20 Jul 2000 10:44:58 -0700
From: Jim Cook <jcook@strobedata.com>
To: abigail@delanet.com
Subject: Re: how to convert "1.2.3.10" to "01020310"?
Message-Id: <39773A9A.98A07D39@strobedata.com>
> :: Mapping in a void context? Abigail??
> Once again. There is absolutely nothing wrong with map in a void context.
Unless you take perldoc to be the gospel:
Found in perlfaq6.pod
What's wrong with using grep or map in a void context?
Both grep and map build a return list, regardless of their
context. This means you're making Perl go to the trouble of
building up a return list that you then just ignore. That's
no
way to treat a programming language, you insensitive
scoundrel!
Note that I am just now looking up 'map' to see what it does, so I have
no opinion about this. I was amused, however, at the "insensitive
scoundrel", er, sorry qq(insensitive scoundrel), remark.
--
jcook@strobedata.com Live Honourably 4/1 - 4/3 + 4/5 - 4/7 + . . .
2000 Tuesdays: Feb/last 4/4 6/6 8/8/ 10/10 12/12 9/5 5/9 7/11 11/7 3/14
Strobe Data Inc. home page http://www.strobedata.com
My home page O- http://jcook.net
------------------------------
Date: Thu, 20 Jul 2000 14:57:10 GMT
From: jdimov@cis.clarion.edu
Subject: Re: humbly parsing Perl
Message-Id: <8l73vr$njo$1@nnrp1.deja.com>
In article <n7hcns481qgutve7vkbhnmojb4ev4579ug@4ax.com>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>
> perl -MO=Deparse yourscript.pl
>
> One serious problem is that missing modules are unacceptable.
>
That's precisely the reason I need help. I want to be able to do this
even if I don't have all the modules and even if the script was written
for a different platform and has no chance of getting interpreted on my
machine.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 20 Jul 2000 15:28:41 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I was wondering if someone will script me a cgi ladder?
Message-Id: <JUEd5.600$Px6.52914@news.dircon.co.uk>
On Tue, 18 Jul 2000 22:17:54 -0700, Jester179 Wrote:
> I need someone to help me script a cgi/perl or asp Gaming
> ladder. Plz reply to this or email me at junior@charter.net
Find a group with the word 'job' in the name.
/J\
------------------------------
Date: Thu, 20 Jul 2000 18:14:46 +0200
From: "Ed Bras" <e.bras@hccnet.nl>
Subject: inheritance of properties ?
Message-Id: <8l78g1$vo$1@enterprise.cistron.net>
What must I include in my perl program, such tat the parent process (the
shell from which perl is called) inheritant the properties of the child
the perl script run from the command prompt) ? Such that I can change the
umask, with the perl script, of the shell where I am in (from where I call
the perl script) ?
Regards,
Ed Bras
------------------------------
Date: 20 Jul 2000 17:46:23 +0100
From: nobull@mail.com
Subject: Re: inheritance of properties ?
Message-Id: <u9snt4eom8.fsf@wcl-l.bham.ac.uk>
"Ed Bras" <e.bras@hccnet.nl> writes:
> What must I include in my perl program, such tat the parent process (the
> shell from which perl is called) inheritant the properties of the child
> the perl script run from the command prompt) ?
Please see the answer to this question in the FAQ.
Please be aware that posting without checking the FAQ means that you
think 5 minuites of your time is more valuable than a couple of hours
of ours. I for one find this insulting.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 20 Jul 2000 19:08:37 +0200
From: "Ed Bras" <e.bras@hccnet.nl>
Subject: Re: inheritance of properties ?
Message-Id: <8l7bkv$50t$1@enterprise.cistron.net>
<nobull@mail.com> wrote in message news:u9snt4eom8.fsf@wcl-l.bham.ac.uk...
> "Ed Bras" <e.bras@hccnet.nl> writes:
>
> > What must I include in my perl program, such tat the parent process (the
> > shell from which perl is called) inheritant the properties of the child
> > the perl script run from the command prompt) ?
>
> Please see the answer to this question in the FAQ.
>
> Please be aware that posting without checking the FAQ means that you
> think 5 minuites of your time is more valuable than a couple of hours
> of ours. I for one find this insulting.
>
> --
> \\ ( )
> . _\\__[oo
> .__/ \\ /\@
> . l___\\
> # ll l\\
> ###LL LL\\
Ok SURE, next time I will put a footer in my mail containing:
Help me with ....
----Checked the FAQ's
----Checked the perdoc/perfunc/....
Happy now ??
Ed Bras
PS: still haven't found it/
------------------------------
Date: Thu, 20 Jul 2000 13:15:05 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: inheritance of properties ?
Message-Id: <39773399.A6C4BFA4@attglobal.net>
Ed Bras wrote:
>
> > Please be aware that posting without checking the FAQ means that you
> > think 5 minuites of your time is more valuable than a couple of hours
> > of ours. I for one find this insulting.
> >
[Don't quote signatures. Anything appearing after a -- on a line
by itself is considered a signature.]
>
> Ok SURE, next time I will put a footer in my mail containing:
>
> Help me with ....
>
> ----Checked the FAQ's
> ----Checked the perdoc/perfunc/....
>
> Happy now ??
>
Most people would greatly appreciate that, but you aren't being
serious, are you? You are greedy. You consider your problem more
important than our time. This makes you few friends here.
*plonk*
------------------------------
Date: Thu, 20 Jul 2000 12:20:47 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: inheritance of properties ?
Message-Id: <397734EF.DEFC58DD@texas.net>
Ed Bras wrote:
>
> <nobull@mail.com> wrote in message news:u9snt4eom8.fsf@wcl-l.bham.ac.uk...
> > "Ed Bras" <e.bras@hccnet.nl> writes:
> >
> > > What must I include in my perl program, such tat the parent process (the
> > > shell from which perl is called) inheritant the properties of the child
> > > the perl script run from the command prompt) ?
> >
> > Please see the answer to this question in the FAQ.
> >
> > Please be aware that posting without checking the FAQ means that you
> > think 5 minuites of your time is more valuable than a couple of hours
> > of ours. I for one find this insulting.
>
> Ok SURE, next time I will put a footer in my mail containing:
>
> Help me with ....
>
> ----Checked the FAQ's
> ----Checked the perdoc/perfunc/....
It's in perlfaq8:
"I {changed directory, modified my environment} in a perl script. How
come the change disappeared when I exited the script?
How do I get my changes to be visible?"
But it isn't really a Perl question, anyway.
> Happy now ??
You've posted several questions in the past couple of weeks - all of
which are documented in the Fine Manual.
With this attitude, when you actually have a question that *isn't*
answered in the documentation, no one with the (correct) answer will see
your post (assuming that they still see them now...).
- Tom
------------------------------
Date: 20 Jul 2000 17:39:55 +0100
From: nobull@mail.com
Subject: Re: Insecure $ENV{PATH} while running setuid
Message-Id: <u9vgy0eox0.fsf@wcl-l.bham.ac.uk>
Hugh Bragg <hugh.bragg@mphasis.com> writes:
> I have a problem with mail aliasing program which Villy tells
> me the answer is here.
No he doesn't.
> Villy Kruse wrote:
> > Perldoc perlsec has the answer, plus quite a few more you didn't
> > know you had a question for.
Villy told you to RTFM, he even told you which FM. He also told you
which newsgroup you should go to if, having RTFM, you were still having
difficulty. There's no evidence that you've RTFM yet so anything
anyone could tell you here (except "RTFM") is likely to be
counter-productive as it may actually discourage you from following
Villy's excellent advice.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 20 Jul 2000 15:22:02 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Intelligent "chomp" ?
Message-Id: <uOEd5.596$Px6.52914@news.dircon.co.uk>
On Thu, 20 Jul 2000 14:35:38 GMT, iwelch@my-deja.com Wrote:
>
>
> So, I think it is time to petition the perl maintainers to intelligize
> chomp. The intent is almost invariably to chop off *all* trailing
> control characters, no matter where the file originated. (Perhaps it
> could be called "chopp"? ;-). )
>
> Can someone let me know how to go about making this suggestion
> appropriately?
>
I dont know whether you got any other responses but you can already do
this by setting $/ to the appropriate value - if that is not what you are
after you are quite welcome to submit a patch that does do what you want
to p5p I'm sure. A patch, mind, not a whinge.
/J\
------------------------------
Date: Thu, 20 Jul 2000 16:26:00 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: looking for a ODP or yahoo style database
Message-Id: <sKFd5.606$Px6.53763@news.dircon.co.uk>
On 20 Jul 2000 06:32:07 GMT, Josiah Bryan Wrote:
> Hahaaaa!!!!
>
> *ploooonnkkk*
>
Haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaaaaaaaaaaaaaaaaaa!
*plonk*
/J\
> ~ josiah
>
> Abigail <abigail@delanet.com> wrote in message
> news:slrn8nd3cb.3do.abigail@alexandra.delanet.com...
>> dbowling (dbowlingNOdbSPAM@iname.com.invalid) wrote on MMDXV September
>> MCMXCIII in <URL:news:06284168.83e5f316@usw-ex0109-070.remarq.com>:
>> `` I am looking to find a perl script (free) for my site that
>> `` will function like yahoo or the ODP.
>>
>> Perhaps you should call yahoo and ask them for their sources.
>>
>>
>>
>> Abigail
>> --
>> $" = "/"; split // => eval join "+" => 1 .. 7;
>> *{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
>> %_ = (Just => another => Perl => Hacker); &{%_};
>
>
------------------------------
Date: Thu, 20 Jul 2000 16:00:30 GMT
From: tltt@my-deja.com
Subject: Re: Looking for http module
Message-Id: <8l77mh$qn7$1@nnrp1.deja.com>
Thanks very much for the prompt reply!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 20 Jul 2000 16:29:48 GMT
From: Declan Kelly <declan@chello.nl>
Subject: LWP::UserAgent Part of Response Missing
Message-Id: <38F5F7BD.F20D68ED@chello.nl>
I'm using LWP::UserAgent to request a web page but part of the page is
missing
when I get the reply. The code is as follows:
use LWP;
use HTTP::Request::Common;
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);
my $req = POST $url;
$req->content_type('application/x-www-form-urlencoded');
$req->content($parameters);
$req->header('Accept' => 'text/html, text/plain');
my $res = $ua->request($req);
When I access the page with a browser it contains links of the form:
<A HREF=/cgi-bin/demo/request.pl?PARAM1=VALUE1&PARAM2=VALUE2
> Name for link </A>
but using the code above $res->content only contains links of the form:
<A HREF=/cgi-bin/demo/request.pl> Name for link </A>
It seems that everything from the question mark up to and including the
end of line
is missing.
Do I need to specify something about the content type of the page I'm
requestion
to avoid this filtering?
Any help would be much appreciated.
Regards,
Declan
------------------------------
Date: Thu, 20 Jul 2000 15:03:53 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Re: Matts Script Archive - A critique
Message-Id: <8l74cb$not$1@nnrp1.deja.com>
In article <39770D29.6A5474CD@attglobal.net>,
Drew Simonis <care227@attglobal.net> wrote:
>
> Do a Deja search on Matt in this NG, you'll find plenty of... err..
> "critiques".
I found a fair few descriptive complaints but nothing where someone had
sat down and quoted a bit of code, explained why it was bad and what it
should be.
I know its a lot to ask so I'm not holding out much hope. I just
thought it would be a nice way to show people how not to do things.
Rich
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 20 Jul 2000 15:06:40 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Re: Matts Script Archive - A critique
Message-Id: <8l74hh$o2p$1@nnrp1.deja.com>
In article <39770E86.4660AE03@la.znet.com>,
"Godzilla!" <callgirl@la.znet.com> wrote:
> Richard Lawrence wrote:
>
> > Has anyone ever written a critique of any of the scripts
> > Matt has written? My perl isn't good enough to spot them
> > myself but I think it would be an excellent learning tool
> > for myself and others out there.
>
> Why only Matt's scripts?
His are some of the most widely used (and critisised). Using some
obscure script written by someone who no-one has heard of would also
work, but probably wouldn't have quite the same impact.
Rich
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 20 Jul 2000 15:23:29 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Matts Script Archive - A critique
Message-Id: <RPEd5.597$Px6.52914@news.dircon.co.uk>
On Thu, 20 Jul 2000 14:13:35 GMT, Richard Lawrence Wrote:
> Has anyone ever written a critique of any of the scripts Matt has
> written? My perl isn't good enough to spot them myself but I think it
> would be an excellent learning tool for myself and others out there.
>
Plenty - search Deja News. All freely available crappy programs written in
Perl got slagged off here sooner or later.
/J\
------------------------------
Date: Thu, 20 Jul 2000 08:50:12 -0700
From: "Godzilla!" <callgirl@la.znet.com>
Subject: Re: Matts Script Archive - A critique
Message-Id: <39771FB4.52A99FB4@la.znet.com>
Richard Lawrence wrote:
> Godzilla!wrote:
> > Richard Lawrence wrote:
> > > Has anyone ever written a critique of any of the scripts
> > > Matt has written? My perl isn't good enough to spot them
> > > myself but I think it would be an excellent learning tool
> > > for myself and others out there.
> > Why only Matt's scripts?
> His are some of the most widely used (and critisised). Using some
> obscure script written by someone who no-one has heard of would also
> work, but probably wouldn't have quite the same impact.
So your opinion is people will learn Perl programming
better by selecting the scripts of only one person for
critique? This suggests other scripts which exemplify
well a common problem should be ignored because these
scripts are not written by the 'right' author.
Why not scripts written by Selena Sol, Tim Ziegler,
Brian Selensky as well? Seems Steve Brenner is quite
famous. His libraries are critiqued here more often
than Matt's scripts. Why not Brenner as well?
Is your objective to learn Perl better or to target
a specific person for critique? If our Perl community
selects only one person for critique, wouldn't this
suggest perhaps some bigotry amongst those of us
populating our Perl community?
Godzilla!
--
print "file:///%43|%2f";
------------------------------
Date: Thu, 20 Jul 2000 16:22:37 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Matts Script Archive - A critique
Message-Id: <hHFd5.605$Px6.53763@news.dircon.co.uk>
On Thu, 20 Jul 2000 15:03:53 GMT, Richard Lawrence Wrote:
> In article <39770D29.6A5474CD@attglobal.net>,
> Drew Simonis <care227@attglobal.net> wrote:
>>
>> Do a Deja search on Matt in this NG, you'll find plenty of... err..
>> "critiques".
>
> I found a fair few descriptive complaints but nothing where someone had
> sat down and quoted a bit of code, explained why it was bad and what it
> should be.
>
> I know its a lot to ask so I'm not holding out much hope. I just
> thought it would be a nice way to show people how not to do things.
>
I certainly posted several in the past year ....
/J\
------------------------------
Date: 20 Jul 2000 16:48:00 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Matts Script Archive - A critique
Message-Id: <slrn8neba0.55n.M.Ray@carlova.ulcc.ac.uk>
On Thu, 20 Jul 2000 15:06:40 GMT, Richard Lawrence <ralawrence@my-deja.com>
wrote:
>In article <39770E86.4660AE03@la.znet.com>,
> "Godzilla!" <callgirl@la.znet.com> wrote:
>> Richard Lawrence wrote:
>>
>> > Has anyone ever written a critique of any of the scripts
>> > Matt has written? My perl isn't good enough to spot them
>> > myself but I think it would be an excellent learning tool
>> > for myself and others out there.
>>
>> Why only Matt's scripts?
>
>His are some of the most widely used (and critisised). Using some
>obscure script written by someone who no-one has heard of would also
>work, but probably wouldn't have quite the same impact.
>
>Rich
What exactly are you aiming for here: something which will help foster
good habits in learning CGI programmers, or something to serve as a
'caveat emptor' for those installing CGI scripts written elsewhere?
Either way, I don't think that concentrating on one author is a good
idea. By casting your net more widely, you can illustrate a wider
set of bad (and good) practices, and also avoid the site looking like
a vendetta.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Thu, 20 Jul 2000 09:58:40 -0700
From: AleMorphy <alemorphyNOalSPAM@hotmail.com.invalid>
Subject: Microsoft Access
Message-Id: <1ed2f720.fd451176@usw-ex0110-076.remarq.com>
Hi everyone,
I'm new to this ng and perl. I have some questions about
doing something w/perl.
I want to write code that would allow me to open MS Access
and create a table and input some data into that table, and
filter/sort according to user input all from perl script.
The table would have around 15 fields, 360 lines/records.
Here's what I got so far:
#!/usr/local/bin/perl -w
#use Win32::OLE qw(in valof with);
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Access';
my $Access = Win32::OLE->new('Access.Application');
$Access->NewCurrentDatabase("chucky.mdb");
#$Access->{NewCurrentDatabase} = "chucky.mdb";
$Access->{Visible} = 1;
my $dbs = $Access->CurrentDb;
my $tdf = $dbs->CreateTableDef("Contacts");
my $fld = $tdf->CreateField("Company Name", dBText, 40);
$tdf->Fields->Append($fld);
$dbs->TableDefs->Append($tdf);
#$Access->{CloseCurrentDatabase};
Any help will be appreciated.
Thanks,
AleMorphy
* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
------------------------------
Date: Thu, 20 Jul 2000 11:01:21 -0700
From: somniculosus <xsNOxsSPAM@korekom.com.invalid>
Subject: Re: multiline regex
Message-Id: <1ca66d84.48be00f1@usw-ex0104-087.remarq.com>
I am sorry about the confusion: the code does work fine. My
disorientation came from the fact that I was outputing the
result to a web browser, and the string contained html tags,
which were (of course, duh!) interpreted by the browser...
I am sorry to waste your time.
Peter
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Thu, 20 Jul 2000 11:06:06 -0600
From: "Kris" <kaweed@micron.com>
Subject: Net::FTP to delete multiple files
Message-Id: <8l7bi2$t6s$1@admin-srv3.micron.com>
Hello-
I am using the Net::Ftp module to transfer some files to a remote
machine. However, I would like to be able to delete all the files (or just
the .gif files) in that directory prior to copying any over. The ftp client
(or server?) does not appear to have any sort of rm *.gif or erase *.gif or
del *.gif, or any such command which I could use. (Client is SunOS, server
is NT Server)
So is there any method that I could use to remove all gif files on the
remote server via my client
before transferring my files? I have played with a method of using the 'ls'
command, then putting all the resulting listed files into an array, and
removing all of those one by one- but I have been unable to get this
functional. Any ideas? Thanks!
Kris
------------------------------
Date: Thu, 20 Jul 2000 10:25:52 -0700
From: sysnovice <gdonovanNOgdSPAM@jeffco.k12.co.us.invalid>
Subject: New to Perl, How to call script and check when finished?
Message-Id: <1415c574.66a03811@usw-ex0109-068.remarq.com>
First let me say I'm not only new to perl I'm new to
programming. So if I am out of line asking this in this
forum please let me know.
What I would like to know is how to call a script to
shutdown a database and check for a condition code to see
when the script has completed. Then I want to call other
functions to mirror and backup the database and send an
email when its all completed. Maybe someone could point me
to some exsisting scripts that I could look at.
Thank you
G.Donovan
Jefferson county school district
* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
------------------------------
Date: Thu, 20 Jul 2000 18:03:36 GMT
From: "Marcus Ouimet" <mouimet@direct.ca>
Subject: Newbie Question
Message-Id: <Y9Hd5.39890$8u4.409284@news1.rdc1.bc.home.com>
I am editing a script but I want to have it do the following. Right now it
searches all 3 things and that is fine and dandy. I am trying to add a
$hiddencity variable which will come from the city input box. ie there is an
input box to put the city in which sends the city to the script. I want it
to search the city and hiddencity field for a word. I hope this makes sense.
Any direction appreciated.
if( (($in{city} eq "") || ($city =~ /$in{city}/i)) &&
(($in{country} eq "NS") || ($country =~ /$in{country}/i)) &&
(($in{state} eq "") || ($in{state} eq "NS") || ($in{state} eq
$state)) ) {
$x++;
------------------------------
Date: Thu, 20 Jul 2000 18:26:33 +0000
From: Mike <mike@cyborg-group.com>
Subject: Re: Newbie: how to split one string to many where there's a space
Message-Id: <964113999.6801.0.nnrp-13.9e986064@news.demon.co.uk>
In article <395c1226@news02.imsbiz.com>, "Tony" <someguy@nospamland.com>
wrote: I have just finished a major exercise which this came up in it is
fairly simply . You use a function called split.
Example
$mystring='my name is mike'
@mynewstring=split(' ',$mystring)# this gives an array with the strings
#seperate - you can use any delimiter you
#want instead of a
#space
You can then write this to filehandle to do other stuff with
> I would like to split up one string into many.
>
> Example: If the string is "how are you doing" , I would like to split it
> up where there's a space to 4 strings- "how", "are", "you", "doing" .
> I'm new to Perl so would appreciate any help, or you could just point me
> to some site.
>
> Thanks.
>
>
>
------------------------------
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 3759
**************************************