[11120] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4720 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 22 10:06:27 1999

Date: Fri, 22 Jan 99 07:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 22 Jan 1999     Volume: 8 Number: 4720

Today's topics:
    Re: "News Group Not Found" dturley@pobox.com
    Re: "News Group Not Found" (Bart Lateur)
    Re: "News Group Not Found" (I R A Aggie)
    Re: CGI and Access <woerdehoff@sdm.de>
        Chgrp (Nathan Clemons)
    Re: gethostbyname troubles (Lee Brandson)
    Re: How long would the Unixes last without Perl? droby@copyright.com
        how to copy file <buga@ipm.lviv.ua>
        how to copy file <buga@ipm.lviv.ua>
    Re: Is there an HTML to CGI.pm converter?? dturley@pobox.com
        multi-dimensional arrays with hashes help please <c-denman@dircon.co.uk>
    Re: multi-dimensional arrays with hashes help please <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: multi-dimensional arrays with hashes help please <lbenfie1@nospamford.com>
        Need Help with PerlShop <luminous@singnet.com.sg>
        Perl XS ? <krakau@iai.fzk.de>
    Re: Perl XS ? <marius@funcom.com>
    Re: preserve the case of a string <lbenfie1@nospamford.com>
    Re: preserve the case of a string <woerdehoff@sdm.de>
    Re: Regex challenge <arpin@adan.kingston.net>
    Re: Regular Expression Question (Al Aab)
    Re: Regular Expression Question (Bart Lateur)
    Re: string to integer conversion <lbenfie1@nospamford.com>
    Re: Yet another basic question. <no_spam@no_spam.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 22 Jan 1999 14:01:17 GMT
From: dturley@pobox.com
Subject: Re: "News Group Not Found"
Message-Id: <78a0b6$psr$1@nnrp1.dejanews.com>

"KernelKlink" == KernelKlink  <KernelKlink@webtv.net> writes:
>
> KernelKlink> I just now found out that the Newsgroup search tool built
> KernelKlink> into Webtv only returns SOME newsgroups. Type "Microsoft"
> KernelKlink> into the widget and the results come back so fast and
> KernelKlink> plentiful that it will knock my tv onto the floor, but
> KernelKlink> type in for example NetObjects (and others) and you get
> KernelKlink> "News Groups Not Found". Newsgroup comes back "Not Found"
> KernelKlink> even if I type in the direct address to it.

Not surprising since NetObjects is a MS competitor.

--

____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 22 Jan 1999 14:09:16 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: "News Group Not Found"
Message-Id: <36a88639.270890@news.skynet.be>

dturley@pobox.com wrote:

>> KernelKlink> I just now found out that the Newsgroup search tool built
>> KernelKlink> into Webtv only returns SOME newsgroups. Type "Microsoft"
>> KernelKlink> into the widget and the results come back so fast and
>> KernelKlink> plentiful that it will knock my tv onto the floor, but
>> KernelKlink> type in for example NetObjects (and others) and you get
>> KernelKlink> "News Groups Not Found". Newsgroup comes back "Not Found"
>> KernelKlink> even if I type in the direct address to it.
>
>Not surprising since NetObjects is a MS competitor.

I think that was "KernelKlink"'s point. What if you consider Perl as a
MS competitor too...

	Bart.


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

Date: Fri, 22 Jan 1999 09:50:13 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: "News Group Not Found"
Message-Id: <fl_aggie-2201990950130001@aggie.coaps.fsu.edu>

In article <36a88639.270890@news.skynet.be>, bart.lateur@skynet.be (Bart
Lateur) wrote:

+ dturley@pobox.com wrote:

+ >> KernelKlink> I just now found out that the Newsgroup search tool built
+ >> KernelKlink> into Webtv only returns SOME newsgroups.

+ >Not surprising since NetObjects is a MS competitor.
 
+ I think that was "KernelKlink"'s point. What if you consider Perl as a
+ MS competitor too...

The microsoft news admins are free to carry, or NOT carry, any newsgroup.
Their servers, their bandwidth, their diskspace, their users, their choice.

James


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

Date: Fri, 22 Jan 1999 13:42:55 +0100
From: Hendrik =?iso-8859-1?Q?W=F6rdehoff?= <woerdehoff@sdm.de>
Subject: Re: CGI and Access
Message-Id: <36A8724F.35C4D52A@sdm.de>

Hans Woolley wrote:
> I'm trying to design an
> interactive web page that interfaces with MS Access. What would be the
> easiest way to go about doing this? I have some experience with perl and a
> book on CGI. I would appreciate any help broad or detailed, reference to
> helpful books, and/or anything at all that would help me out.

Read up on DBI/DBD::ODBC or Win32::ODBC as well for the database access
and you know everything you need to know (except for some nasty
performance issues :-).

Unless of course you want to have your CGI running on a Unix/Linux
machine. Then it gets a bit more technical because there is no way to
use an MS Access database (file) under Unix. In this case you need a
second computer with Win 95/98/NT connected via some appropriate
middleware.

Yours
  Hendrik


Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all unsolicited commercial E-mail sent to this address
is subject to a download and archival fee in the amount of $500
US (per infraction).  E-mailing denotes acceptance of these terms.

--
Hendrik W"ordehoff         |s  |d &|m  |  software design & management
                           |   |   |   |  GmbH & Co. KG                :
woerdehoff@sdm.de          |   |   |   |  Thomas-Dehler-Str. 27      >B)
Tel/Fax (089) 63812-337/515               81737 M"unchen               :


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

Date: Fri, 22 Jan 1999 14:42:33 GMT
From: nathan@ici.net (Nathan Clemons)
Subject: Chgrp
Message-Id: <36a88e0e.68930840@news.ici.net>

Is there a chgrp function under Perl 5.004_04? Do you have to be root
to use it, if so?

--Nathan.

(Already did a perldoc -f chgrp and didnt see it.)


_________________________________________________________________________
Nathan Clemons
Associate Systems Engineer
WinStar iCi
Broadband Services
Great Woods Office Park 800 South Main St. Mansfield, MA 02048
_________________________________________________________________________
nclemons@winstar.com   http://www.winstar.com/  (v) 800-234-0002
   nathan@ici.net      http://www.ici.net/      (f) 508-261-0430


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

Date: 22 Jan 1999 13:09:22 GMT
From: rlb@intrinsix.ca (Lee Brandson)
Subject: Re: gethostbyname troubles
Message-Id: <rlb-2201990821050001@204.112.166.54>

In article <831zknd2gu.fsf@vcpc.univie.ac.at>, Tony Curtis
<Tony.Curtis+usenet@vcpc.univie.ac.at> wrote:

> 
> surely this is saying that @addrs contains 1 entry
> (the maximum array index is 0).  If you unpack it:
> 
>     $dn = 'revelstoke-11.junction.net';
>     ($name, $aliases, $type, $length, @addrs) = gethostbyname ($dn);
>     
>     foreach $a (@addrs) {
>         $ip = join('.', unpack('C4', $a));
>         print "$ip\n";
>     }
> 
>     ==> 206.12.8.140
> 
> That looks right to me...

Gah! You're absolutely right. I guess it stopped working the day I made
half-clever revisions. :)

Thanks, Tony. It was the sort of bug I could have looked at forever
without twigging the obvious.

-- 
Lee Brandson, Burnt Lake Software and Intrinsix Canada


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

Date: Fri, 22 Jan 1999 14:04:22 GMT
From: droby@copyright.com
Subject: Re: How long would the Unixes last without Perl?
Message-Id: <78a0gv$q4v$1@nnrp1.dejanews.com>

Unix lasted about 12 years without Perl.

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 22 Jan 1999 15:59:42 +0200
From: "Yaroslav Buga" <buga@ipm.lviv.ua>
Subject: how to copy file
Message-Id: <78a041$9vn$1@MU.icmp.lviv.ua>

Does anybody know how to copy file in perl?
Thanks.




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

Date: Fri, 22 Jan 1999 16:35:23 +0200
From: "Yaroslav Buga" <buga@ipm.lviv.ua>
Subject: how to copy file
Message-Id: <78a26t$cjm$1@MU.icmp.lviv.ua>

I need information about how to copy file using perl for win32.




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

Date: Fri, 22 Jan 1999 13:59:00 GMT
From: dturley@pobox.com
To: jete@dgs.dgsys.com
Subject: Re: Is there an HTML to CGI.pm converter??
Message-Id: <78a06t$ppd$1@nnrp1.dejanews.com>

In article <7885jf$1sl@dgs.dgsys.com>,
  jete@dgs.dgsys.com (Jete Software Inc.) wrote:
>Is there a converter
> which will accept a file of HTML code and produce the appropriate
> calls to CGI.pm routines to produce output which is identical to its
> HMTL input??

I just answewred this question a couple of weeks ago.  Randal Schwartz did
just this in a column in Web Techniques

http://www.stonehenge.com/merlyn/WebTechniques/col31.listing.txt

I've used the script a bunch. It doesn't do forms, I just use placeholders and
fix manually.

(BTW, web techniques is free and dejanews allows you to search newsgroups
posts. :-)

--
____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 22 Jan 1999 13:59:45 -0000
From: "Chris Denman" <c-denman@dircon.co.uk>
Subject: multi-dimensional arrays with hashes help please
Message-Id: <78a04f$1i0$1@starburst.uk.insnet.net>

Now, I know this code will not work:

$founddata[0]{'name'}='Chris';
$founddata[0]{'age'}='27';
$founddata[1]{'name'}='Fred';
$founddata[1]{'age'}='Fred';

$cnt=0;
foreach $one (@founddata){
    foreach $key (keys %founddata[$cnt]){
        print "$founddata[$cnt]{$key}\n\n";
        }
    $cnt++;
    }

But I need to do the same with legitimate code, anyone know how?

Thanks in advance!

Chris Denman




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

Date: 22 Jan 1999 15:29:17 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: multi-dimensional arrays with hashes help please
Message-Id: <83yamvgz42.fsf@vcpc.univie.ac.at>

Re: multi-dimensional arrays with hashes help
please, Chris <c-denman@dircon.co.uk> said:

Chris> Now, I know this code will not work:
Chris> $founddata[0]{'name'}='Chris';
Chris> $founddata[0]{'age'}='27';
Chris> $founddata[1]{'name'}='Fred';
Chris> $founddata[1]{'age'}='Fred';

$founddata{0}{name} = ...

and so on.

Then you can double walk the hash keys.

    foreach $index ( keys %founddata ) {
        foreach $attr ( keys %{$founddata{$index}} ) {
            print "$index $attr $founddata{$index}{$attr}\n";
        }
    }

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien.  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Fri, 22 Jan 1999 14:03:48 +0000
From: Lee Benfield <lbenfie1@nospamford.com>
Subject: Re: multi-dimensional arrays with hashes help please
Message-Id: <36A88544.4625A59B@nospamford.com>

Only one minor change... :)

Chris Denman wrote:
> 
> Now, I know this code will not work:
> 
> $founddata[0]{'name'}='Chris';
> $founddata[0]{'age'}='27';
> $founddata[1]{'name'}='Fred';
> $founddata[1]{'age'}='Fred';
> 
> $cnt=0;
> foreach $one (@founddata){
>     foreach $key (keys %founddata[$cnt]){

     foreach $key (keys %{$founddata[$cnt]}){

Fixes it.

>         print "$founddata[$cnt]{$key}\n\n";
>         }
>     $cnt++;
>     }
> 
> But I need to do the same with legitimate code, anyone know how?
> 
> Thanks in advance!
> 
> Chris Denman

Lee.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Lee Benfield, Ford Motor Co.


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

Date: Fri, 22 Jan 1999 21:29:36 +0800
From: Peter Stephens <luminous@singnet.com.sg>
Subject: Need Help with PerlShop
Message-Id: <36A87D3F.19DD423C@singnet.com.sg>

I need help setting up and configuring PerlShop on my
server.
Any help would be appreciated.
Contact through e-mail.
peter@glo-net.com

Thanks



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

Date: Fri, 22 Jan 1999 13:47:43 +0100
From: Tristan Krakau <krakau@iai.fzk.de>
Subject: Perl XS ?
Message-Id: <36A8736E.15E8E750@iai.fzk.de>

I have a huge library with C-functions and some header files and I want
to create a XS Interface to use them in my perl script.
Is there any tool to automatically generate this?



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

Date: Fri, 22 Jan 1999 14:02:23 +0100
From: Marius Kjeldahl <marius@funcom.com>
Subject: Re: Perl XS ?
Message-Id: <36A876DF.AB9867A@funcom.com>

Tristan Krakau wrote:
> 
> I have a huge library with C-functions and some header files and I want
> to create a XS Interface to use them in my perl script.
> Is there any tool to automatically generate this?

Search for "perl" and "SWIG".

Marius


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

Date: Fri, 22 Jan 1999 11:19:40 +0000
From: Lee Benfield <lbenfie1@nospamford.com>
Subject: Re: preserve the case of a string
Message-Id: <36A85ECC.75FF556E@nospamford.com>

>         {
>         $string =~ s/$_/<FONT COLOR=DARKRED>$_<\/FONT>/gi;
>         }

What you're doing here is substituting the string you're looking for,
not the string you matched.

Use either

$string =~ s/$_/<FONT COLOR=DARKRED>$&<\/FONT>/gi;

or

$string =~ s/($_)/<FONT COLOR=DARKRED>$1<\/FONT>/gi;

The latter is more efficient (I believe) but the former looks nicer.


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Lee Benfield, Ford Motor Co.


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

Date: Fri, 22 Jan 1999 13:46:20 +0100
From: Hendrik =?iso-8859-1?Q?W=F6rdehoff?= <woerdehoff@sdm.de>
Subject: Re: preserve the case of a string
Message-Id: <36A8731C.8761C86F@sdm.de>

"Jason Q." wrote:
> @keyword = ("einstein", "newton", "curie");
> 
> $string = "Albert Einstein, Isaac Newton, Marie Curie";
> 
> foreach (@keyword)
>         {
>         $string =~ s/$_/<FONT COLOR=DARKRED>$_<\/FONT>/gi;
>         }
> 
> print $string;

Just replace it with the actually matched string, not the one you were
looking for:
  $string =~ s/($_)/<FONT COLOR=DARKRED>$1<\/FONT>/gi;

Yours
  Hendrik

Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all unsolicited commercial E-mail sent to this address
is subject to a download and archival fee in the amount of $500
US (per infraction).  E-mailing denotes acceptance of these terms.

--
Hendrik W"ordehoff         |s  |d &|m  |  software design & management
                           |   |   |   |  GmbH & Co. KG                :
woerdehoff@sdm.de          |   |   |   |  Thomas-Dehler-Str. 27      >B)
Tel/Fax (089) 63812-337/515               81737 M"unchen               :


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

Date: Fri, 22 Jan 1999 10:01:49 -0500
From: Andre Arpin <arpin@adan.kingston.net>
Subject: Re: Regex challenge
Message-Id: <36A892DD.1BB9E397@adan.kingston.net>

this is realy neat but will accept xta\&ble

the following will not
m {${\('&?' . (join '&?' => split / / => '\\b t a b l e \\b') . '&?')}};
this was easy to do after seeing the original solution

good luck

Andre

PS: I keep reading your answer and learning more and more

Abigail wrote:

> Eric Smith (eric@nafex.comi) wrote on MCMLXIII September MCMXCIII in
> <URL:news:slrn79ueln.2m2.eric@eric.nafex.com>:
> $$
> $$ 1) I want to match a word, say `table' but the character \& or ampersand
> $$ can appear anywhere in table so all these are legal:
> $$ \&table
> $$ t\&able
> $$ ta\&ble
> $$ ... [snip] ...
> $$ table\&
> $$
> $$ any elegant solutions for my regex?
>
> What do you mean? The single character '&', or the two characters '\&'?
> Can the '&' appear more than once? More than once on the same place?
> Assuming you mean the character '&', allowed to appear more than once,
> but at most once on the same place:
>
>     m {${\('&?' . (join '&?' => split // => 'table') . '&?')}};
>
> Abigail



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

Date: Fri, 22 Jan 1999 12:13:01 GMT
From: af137@torfree.net (Al Aab)
Subject: Re: Regular Expression Question
Message-Id: <F5yn9q.2Bp.0.queen@torfree.net>








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
			   SED RESOURCES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

to  master      regular  expressions         
to  master      sed                          
join my         seders  informal  email  list :
			af137@torfree.net
				----

			    sed web pages


"sed one liners"    by 				  Eric Pement 
"Doing It with sed" by sed stud 		  Carlos J. G. Duarte

seders.icheme.org/	 seders grab bag (seders official web page)
www.dbnet.ece.ntua.gr/~george/#seders  seder, engineer, Dr2b Yiorgos
www.tec.ualberta.ca/Documentation/Info/by-node/sed-3.02/
ftp://alpha.gnu.org/gnu/sed/sed-3.02a.tar.gz     experimaental gnu sed
ftp://algos.inesc.pt/pub/users/cdua/libs.tar.gz    Carlos J. G. Duarte
ftp://algos.inesc.pt/pub/users/cdua/scripts.tar.g  Carlos J. G. Duarte
ftp://ftp.soi.city.ac.uk/papers/94/cs94-1.ps reverse regular expressions
wuarchive.wustl.edu/systems/unix/4.3bsd-reno/usr.bin/sed/hanoi.sed.Z
wuarchive.wustl.edu/systems/unix/4.3bsd-reno/usr.bin/sed/math.sed.Z
                             THE SED FAQ                 
                             Eric Pement  
                            
latest version of the sed FAQ is usually at:             
   seders.icheme.org/tutorials/sed_faq.txt
   www.dbnet.ece.ntua.gr/~george/sed/sedfaq.html  
   www.ptug.org/sed/sedfaq.html                   
   www.cornerstonemag.com/sed/sedfaq.html         

				----
				
www.math.fu-berlin.de/~guckes/sed/                 seder Herr Guckes
www.math.fu-berlin.de/~leitner/sed/	               Herr Leitner
www.ptug.org/sed/custom_sed.html supersed writer, seder Simon Taylor 
www.cis.nctu.edu.tw/~gis84806/sed exotic scripts.seder Yao-Jen Chang

		  sed/regular expressions tutorials/refs

1- www.dordt.edu:457/OSUserG/BOOKCHAPTER-14.html
				     Chapter 14, Manipulating text with sed
2- "Doing It with sed" by sed stud Carlos (see http's above)

3- SunOS Manual Pages
	http://www.intac.com/man/sunos/sed.1v.html
	http://cmgm.stanford.edu/man2html/sed.1v.html

4- u-sedit2. has nice sed docs.
www.cornerstonemag.com/sed/index.htm (new version)
wuarchive.wustl.edu/systems/ibmpc/garbo.uwasa.fi/editor/u-sedit2.zip

5- dc UNIX stack-calculator, in sed, by sed stud  GREG UBBEN
	www.dbnet.ece.ntua.gr/~george/sed/dc.sed.html

6- sierpinski gasket/triangle, in sed, by sed stud KEN PIZZINI 
	posted by Al Aab, in July 1998 to
	alt.comp.editors.batch  &  comp.unix.shell
	search dejanews    

				----


			some sed implementaions


GNU sed-3.02
for UNIX :
ftp://ftp.gnu.org/pub/gnu/sed-3.02.tar.gz  
for DOS  :
ftp.urz.uni-heidelberg.de/ftp/pub/simtelnet/gnu/djgpp/v2gnu/sed3
sunsite.doc.ic.ac.uk/packages/simtelnet/gnu/djgpp/v2gnu/sed302b.zip
  and many many djgpp mirrors,   even in russia & latvia

sedmod.zip    extended/awkish   DOS    sed (bugs)
ftp://ftp.adam.anet.cz/pub/cdrom3/fileutil/sedmod.zip
www.ptug.org/sed/SEDMOD10.ZIP

MKS Toolkit, windows 32 http://www.mks.com
                                                                    
ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/win95/util/                  
ud32_v43.zip B  3381699  980512  UnixDos: Full Unix set: 65 progs +28 new 
utils
                                                                               
ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/win3/util/                   
ud16_v42.zip B  4767550  980313  UnixDos: Full Unix set. 64 progs +28 new 
utils
also ud32...

oak.oakland.edu/pub/simtelnet/msdos/txtutl/mintr151.zip   (NOT sed per se)
				----
		       my favourite DOS/UNIX sed :

 ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/msdos/txtutl/sed15.zip
 ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/msdos/txtutl/sed15x.zip

Directory: /pub/systems/pc/simtelnet/msdos/txtutl/
Filename    Type Length  Date    Description
sed15.zip    B    62082  910930  Unix-compatible streaming editor v1.5 TC src
sed15x.zip   B    20300  910930  Unix-compatible streaming editor v1.5 EXE/docs

	      sed15.zip has C source, compilable for UNIX.
	
sed15.exe compiled with mingw32 for 32bit environments at:
http://www.dbnet.ece.ntua.gr/~george/sed/sed15.exe        
				----
sed/batch/text		      newsgroup:
			alt.comp.editors.batch   	   
if your newsfeed does not carry it, search dejanews.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
=-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
al aab, seders moderator                                      sed u soon 
               it is not zat we do not see the  s o l u t i o n          
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+


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

Date: Fri, 22 Jan 1999 13:11:31 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Regular Expression Question
Message-Id: <36ab7885.15962138@news.skynet.be>

parab0la@my-dejanews.com wrote:

>I'm try to match the pattern /helloworld/ or /byeworld/.  Is there any way
>that I can combine them in one regexp, something like /\(hello|bye\)world/ ?

Is your syntax based on the syntax in Nisus (wordprocessor), or
something?

Drop the backwhacks before the parens. Backwhacks are for QUOTING
non-word characters (anything but leter, digits, underscore).

	Bart.


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

Date: Fri, 22 Jan 1999 11:25:53 +0000
From: Lee Benfield <lbenfie1@nospamford.com>
Subject: Re: string to integer conversion
Message-Id: <36A86041.8DBD8354@nospamford.com>

Err, james, I'm sure this is bound to be in 

a) the FAQ
b) (definitely) the Manual.

use 

int($mystring)

Lee.

James wrote:
> 
> Sirs,
> 
> Hi.. I'm new to perl. I would like to know how will i Convert a string
> number "47" to integer number 47 ?? For example, I have this program that
> adds 2 to "47". So i have to convert "47" to 47 then add 2 to make it 49
> then convert it back to "49" string.. how ??
> 
> thanx for any help u can give me..
> 
> James

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Lee Benfield, Ford Motor Co.


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

Date: Fri, 22 Jan 1999 08:30:38 -0600
From: "Ban Spam Now" <no_spam@no_spam.com>
Subject: Re: Yet another basic question.
Message-Id: <78a24u$fbe@dfw-ixnews10.ix.netcom.com>

Thanks Ala.  BTW what is "perlvar"?

Ala Qumsieh wrote in message ...
>
>"Ban Spam Now" <no_spam@no_spam.com> writes:
>
>>
>> Is there any way to run an external ksh script, store the output in one
Perl
>> variable and the return code in another Perl variable.  Does Perl work in
>> such a way that the return code you get back will be the same as $?  ?
>
>Well, you should've read perlvar before you posted.
>From perlvar:
>
>     $?      The status returned by the last pipe close, backtick
>             (``) command, or system() operator.  Note that this
>             is the status word returned by the wait() system
>             call (or else is made up to look like it).  Thus,
>             the exit value of the subprocess is actually ($? >>
>             8), and $? & 255 gives which signal, if any, the
>             process died from, and whether there was a core
>             dump.  (Mnemonic: similar to sh and ksh.)
>
>
>so ... to run your script from Perl, you would do something like:
>
>$output = `script.sh`;
>
># $output has the output of your script
># $? will have it's exit status as mentioned above.
>
>HTH,
>Ala
>




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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4720
**************************************

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