[12462] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6062 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 20 00:07:22 1999

Date: Sat, 19 Jun 99 21:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 19 Jun 1999     Volume: 8 Number: 6062

Today's topics:
    Re: Afraid to ask about Y2K! (Abigail)
    Re: Cure for document deficiency (Marcel Grunauer)
    Re: function to read a line & return it <rick.delaney@home.com>
        Good reasons for avoiding modules (was: Re: Afraid to a <rootbeer@redcat.com>
    Re: HELP! update problem using DBD::XBase on win32 jbell@263.net
        HOW DO I PAD A STRING IN PERL?? <perfecto@ct2.nai.net>
    Re: HOW DO I PAD A STRING IN PERL?? (Andrew Johnson)
    Re: HOW DO I PAD A STRING IN PERL?? <rootbeer@redcat.com>
    Re: Is Perl4 Y2K compliant? (twod)
    Re: Language choice for high-volume Oracle CGI interfac (Abigail)
    Re: newbie - NT <farell@startrekmail.com>
    Re: Newbie need help <farell@startrekmail.com>
    Re: No Wait TCP on Internet Sockets <rootbeer@redcat.com>
    Re: Password protecting scripts. . . <rootbeer@redcat.com>
    Re: Perl back to bloody Netscape browser (Abigail)
        PerlScript vs JScript vs VBScript for WSH <truejaws@bbs.para.co.kr>
    Re: Problem with stty, Perl and CGI (Abigail)
    Re: Recommend a simple Online database? (Abigail)
    Re: simple question about array (Mark-Jason Dominus)
    Re: Sort (Mark-Jason Dominus)
    Re: State machine tool <rpsavage@ozemail.com.au>
    Re: UNIX: ~name won't work on system() as expected <rra@stanford.edu>
    Re: UNIX: ~name won't work on system() as expected <rick.delaney@home.com>
    Re: Urgent and important : CSV !!! <rootbeer@redcat.com>
    Re: Urgent and important : CSV !!! <revjack@radix.net>
        writing at mark from print <maistro@swi.hu>
    Re: writing at mark from print <walton@frontiernet.net>
    Re: writing at mark from print <rootbeer@redcat.com>
    Re: writing at mark from print (Bill)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 19 Jun 1999 15:37:35 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mnvsb.37n.abigail@alexandra.delanet.com>

Paul David Fardy (pdf@morgan.ucs.mun.ca) wrote on MMCXVIII September
MCMXCIII in <URL:news:7kgmsf$5sf$1@coranto.ucs.mun.ca>:
"" Lee <rlb@intrinsix.ca> wrote:
"" >>> In Perl, I *expect* to find the imaginary humantime() function. This
"" >>> is one  of the few times it has left me disappointed.
"" 
"" Lee <rlb@intrinsix.ca> later wrote:
"" >>  I know (or suspect, I've never actually used any of them) that
"" >>  there are at least three modules that give this functionality. But
"" >>  it seems such a common need/desire that it shouldn't require a
"" >>  module. Or am I being a silly git again?
"" 
"" abigail@delanet.com (Abigail) writes:
"" >   What's the fear for a module?
"" 
"" If it's in Perl's core modules, no fear.  Elsewise, the trouble I have
"" is with portability.  I'll have to distribute a growing list of modules
"" with my programs.  And is the module up-to-date?


We are talking about a module that's a wrapper around localtime().
How much chance do you think there is that such a module goes "out of date"?

Besides, if you write the module yourself, *you* decide when it's out of date;
and then you fix it.


Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 20 Jun 1999 01:08:00 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Cure for document deficiency
Message-Id: <37803e48.37621426@enews.newsguy.com>

On 19 Jun 1999 17:08:38 -0700 it came to pass that Tom Christiansen
<tchrist@mox.perl.com> produced 6 lines that required the following
response:

>I have an idea.  When someone asks a questions that's in the standard
>perl manpages, we'll all simply mail them the complete manpage. :-)
>
>--tom

Hmmm. If a lot of people do that, the poor unfortunate will end up
with dozens of more or less duplicate explanations. This should really
drive the point home.

Or will there be one person whose job it is to do the mailing? A kind
of moron pumpkin holder?

Marcel



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

Date: Sun, 20 Jun 1999 01:10:36 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: function to read a line & return it
Message-Id: <376C3F52.3ED1B607@home.com>

[posted & mailed]

Eric Bohlman wrote:
> 
> [Note to other regulars: I'm going easy on John because I've seen his
> valuable contributions in c-related groups and I know that he's no script
> kiddie]

Oh, please!  You're never hard on anyone.  :-)

[Aside] Just what exactly is the definition of 'script kiddie', that I
see mentioned here so often?  I think I resemble that remark.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 19 Jun 1999 19:25:35 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Good reasons for avoiding modules (was: Re: Afraid to ask about Y2K!)
Message-Id: <Pine.GSO.4.02A.9906191913010.20930-100000@user2.teleport.com>

On 19 Jun 1999, Paul David Fardy wrote:

> abigail@delanet.com (Abigail) writes:
> >   What's the fear for a module?
> 
> If it's in Perl's core modules, no fear.  Elsewise, the trouble I have
> is with portability.  I'll have to distribute a growing list of
> modules with my programs.  And is the module up-to-date?

In what way is implementing the equivalent of a well-written module's code
within your own programs more portable, easier to distribute, or easier to
keep up-to-date?

I'm not asking this rhetorically. If you have a legitimate reason for
supporting any one of those three points, we should do all that we can to
fix that aspect of Perl's modules, so as to make them even more useful.
But I think the current implementation has the edge on all three counts:

    Portability. It's simpler to port one module than dozens of 
	programs. In fact, most modules you'd wish to have ported 
	already are.

    Distribution. It may not seem simpler at first glance to distribute
	modules and programs separately, in that there are more "pieces"
	to keep track of. But it minimizes the size of the distributions,
	and makes configuring and installation simpler in the long run.

    Updates. It's much easier to update a well-written module and a
	program separately than to update the giant program containing
	the module's functionality. 

Now, there may be special (very rare) cases in which one of these would
not apply. (And, I'd suspect, in most of those cases, Perl isn't the best
choice for solving the problem in the first place.) But if you feel that
I'm wrong about any one of these three points in general, I'd like to hear
your reasoning.

Thanks!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 20 Jun 1999 01:30:20 GMT
From: jbell@263.net
Subject: Re: HELP! update problem using DBD::XBase on win32
Message-Id: <7khg7d$6in$1@nnrp1.deja.com>

In article <7kh7mu$4ts$1@gellyfish.btinternet.com>,
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Sat, 19 Jun 1999 20:06:53 GMT jbell@263.net wrote:
> > Hi, anyone can please help.
> >
> > I'm trying to doing some update on a .dbf table.  my script looks
> > like this,
> >
> > use DBI;
> > 	my $sql = "update my_table set city = 'BELLEVILL', set carn
> > = '2' where useruid = '929817326'";
> >
> > 	my $dbh = DBI->connect("DBI:XBase:\Root\My_dir}") or die
> > $DBI::errstr;
>
> You either need to use single quotes in that connect string or do
something
> about the slashes.

There was no problem using the following line.

my $dbh = DBI->connect("DBI:XBase:\Root\My_dir") or die $DBI::errstr;

because if I use the following $sql, then it works fine.

	my $sql = "update my_table set carn = '2' where useruid
= '929817326'";

It seems it just wouldn't take more than one pair of set.

----
Regards,
JB


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sun, 20 Jun 1999 02:41:56 GMT
From: Perry Fecteau <perfecto@ct2.nai.net>
Subject: HOW DO I PAD A STRING IN PERL??
Message-Id: <376C5540.EF0BD046@ct2.nai.net>

for example, i want 23 to look like 00023...

how do i do that??


-- 
J Perry Fecteau, 5-time Mr. Internet.
http://w3.nai.net/~perfecto

Star Wars Review at:
http://www.geocities.com/ResearchTriangle/Node/7160/episodeone.html


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

Date: Sun, 20 Jun 1999 03:00:03 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: HOW DO I PAD A STRING IN PERL??
Message-Id: <TOYa3.2$36.81@news2.rdc1.on.home.com>

In article <376C5540.EF0BD046@ct2.nai.net>,
 Perry Fecteau <perfecto@ct2.nai.net> wrote:
! for example, i want 23 to look like 00023...
! 
! how do i do that??

[danger:jandrew:~]$ faqgrep pad
perlfaq4.pod: How do I pad a string with blanks or pad a number 
              with zeroes?

the answer lies therein.

regards
andrew


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

Date: Sat, 19 Jun 1999 20:16:30 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: HOW DO I PAD A STRING IN PERL??
Message-Id: <Pine.GSO.4.02A.9906192013130.20930-100000@user2.teleport.com>

On Sun, 20 Jun 1999, Perry Fecteau wrote:

> Subject: HOW DO I PAD A STRING IN PERL??

There's no need to shout!

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

> for example, i want 23 to look like 00023...
> 
> how do i do that??

You probably want sprintf. See the perlfunc manpage.

> J Perry Fecteau, 5-time Mr. Internet.
> http://w3.nai.net/~perfecto

'5-time Mr. Internet'? 'perfecto'? Ohhh! So... many... jokes.... 
Must... resist... temptation....  Must... press... send... now....

:-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 20 Jun 1999 03:48:04 GMT
From: twod@not.valid (twod)
Subject: Re: Is Perl4 Y2K compliant?
Message-Id: <UvZa3.13169$NY6.4636@news.rdc1.sfba.home.com>

Daniel W. Burke (dwb1@home.com) wrote:
: I can't speak for anyone else, but my concern is for the built-in functions
: and or variables the language has.  As a result of my seeking if perl4 is
: "Y2K Compliant" I've learned about the odd-ness (well, I think it's odd) of
: how localtime() returns the year, and was able to fix 2 scripts this morning.

Is that 'oddness' documented ? :) 

Can the language be blamed if the developers and code-readers don't RTFM ? :)

Escaping sarcasm for a moment - With languages such as PERL it is generally 
not the language/interpreter itself that you should be worried about, but the
 OS and libraries upon which they were built. 

When was your PERL4 binary built ?

Using what libraries ?

Using what version of the OS ?

Are they all Y2K compliant ?

I would suspect that a PERL4 application that hasn't been ported to PERL5 is
running on a machine that itself may not Y2K compliant. 

The best way forward IMHO is to fully and comprehensively test both the
machine and application for Y2K compliance.

: perl in general... and hey, better safe then sorry...

Indeed. Test, test and then retest. 

IAP
-- 
I am using anti-spam measures please replace 'not.valid' with 'home.com'


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

Date: 19 Jun 1999 13:56:43 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Language choice for high-volume Oracle CGI interface?
Message-Id: <slrn7mnpv7.lri.abigail@alexandra.delanet.com>

Rene Pijlman (R.Pijlman@applinet.nl) wrote on MMCXVIII September MCMXCIII
in <URL:news:376bc441.31028827@news.xs4all.nl>:
[] 
[] Don't use CGI for high-volume transactions. It spawns a process with a new
[] database session for every hit.


You must be years behind in your literature. Apache with mod_perl won't
spawn processes.

Of course to answer the original question, the answer depends on a lot
more than "now 10,000 transactions, later 1,000,000 transactions". 


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sat, 19 Jun 1999 20:38:40 -0700
From: "nightcom" <farell@startrekmail.com>
Subject: Re: newbie - NT
Message-Id: <jnZa3.33$kd4.11480@news2.randori.com>

Here's a site that I was given, which should help you out
http://dynamicnet.net/support/fp/perlwithPWS.htm
*contains information for IIS also
nightcom

Kim Crompton <xxkcrompton@compuhelp.net> wrote in message
news:NlGa3.885$yE1.72513@monger.newsread.com...
> I have purchased several books on Perl 5 and cannot figure out how to
> execute a perl script from the command line of my browser.  I receive the
> error:
>
> %1 is not a valid Windows NT application.
>
> I can run perl scripts from the command line.  I'm fairly certain that
Perl
> is installed correctly.  All of the documentation that I have found is for
> UNIX or Apache.  I don't even know what the shebang line should look like
or
> if I even need one.  I have tried #!perl and #!d:/Perl/bin/perl.exe.  I
get
> the same results for both.
>
> I am trying to interface to the UPS online system.  The sample code they
> have given is in written in Perl.  I've tried using PerlScript with active
> server pages but it doesn't work (it doesn't give me an error either).
So,
> as a last resort I need to use either a .pl file or a .cgi file.  Can
anyone
> help me?
>
> I am running windows NT server, IIS 4.0, and Perl build 5.15.
>
> Please email me at kcrompton@compuhelp.net
>
> Thanks
>
>
>




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

Date: Sat, 19 Jun 1999 20:36:04 -0700
From: "nightcom" <farell@startrekmail.com>
Subject: Re: Newbie need help
Message-Id: <TkZa3.32$kd4.11282@news2.randori.com>

Thanks anyway to all who have responded
 ....the FAQ(s) are rather useless in trying to figure out
how to configure PWS.
But finally I found a site that showed how to tweak the registry
 ..now I can run cgi(s) locally

Thanks anyway...please ignore this
query from now on.

nightcom

nightcom <farell@startrekmail.com> wrote in message
news:pRFa3.94$Oi2.20577@news2.randori.com...
> Hi,
> can somebody help me?
> How do I configure Personal Web Server
> to run cgi scripts?
> I'm running win98 and recently downloaded
> ActivePerl Build 517, though I have no idea how  to run
> the demo cgi(s) included.
> I tried creating a virtual dir. and selected all three permission for
> this dir. but I still can't run any cgi(s).
> Even tried searching on activeperl's website but not much info
> there about PWS.
>
> Any help is most appreciated.
> Thanks.
>
> regards,
> nightcom
>
>




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

Date: Sat, 19 Jun 1999 19:05:30 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: No Wait TCP on Internet Sockets
Message-Id: <Pine.GSO.4.02A.9906191904440.20930-100000@user2.teleport.com>

On Fri, 18 Jun 1999 zephaar@my-deja.com wrote:

> Can I just use Fcntl and connect in perl like I would in C/C++ to
> open/read/write/close on a tcp socket?

Generally, yes. Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 19 Jun 1999 19:33:08 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Password protecting scripts. . .
Message-Id: <Pine.GSO.4.02A.9906191932020.20930-100000@user2.teleport.com>

On Sat, 19 Jun 1999, Jonathan Chum wrote:

> Is there a way so that the script can handle users who are logged on
> with different IP addresses at the same time? It seems, it rewrites
> over the file eveytime a successful password is entered.

Maybe you should ask the author of that program to help you. Or, maybe you
should re-write it yourself. Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 19 Jun 1999 13:48:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl back to bloody Netscape browser
Message-Id: <slrn7mnpf2.lri.abigail@alexandra.delanet.com>

Michael Dean (michael.dean@radiophone-services.co.uk) wrote on MMCXVIII
September MCMXCIII in <URL:news:7kgi05$gp5$1@uranium.btinternet.com>:
 .. 
 .. My perl scripts work fine with Internet Explorer V4+
 .. However they do not work with Netscape (I'm using V4.5)


The answer is clear, but beyond the scope of this group. If you have
a Perl question, feel free to ask it. But browser and HTTP issues do
not belong here.

Ask elsewhere.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 20 Jun 1999 12:16:05 +0900
From: "Sangjin Han" <truejaws@bbs.para.co.kr>
Subject: PerlScript vs JScript vs VBScript for WSH
Message-Id: <7khm39$o6o$1@newsread.unitel.co.kr>

I read a sample wsh vbscript for printing Environment variables.

-------------------------------------
' VB Script
Set WShShell = WScript.CreateObject("WScript.Shell")

For Each strTemp In WShShell.Environment
 WScript.Echo strTemp
Next
-------------------------------------

And I could write an equivalent WSH-JScript source easily.
-------------------------------------
// Java Script
WShell = WScript.CreateObject("WScript.Shell");

Envs = new Enumerator( WShell.Environment );
for( Envs.moveFirst(); !Envs.atEnd(); Envs.moveNext())
{
 WScript.Echo( Envs.item() );
}
-------------------------------------

But I could not write the PerlScript version.

I hope the perl version does not use $ENV variable.

Does the PerlScript has the ability similar VBScript or JScript in this
situation ?


truejaws





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

Date: 19 Jun 1999 13:50:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Problem with stty, Perl and CGI
Message-Id: <slrn7mnpk2.lri.abigail@alexandra.delanet.com>

Marco Anstett (marco.anstett@okay.net) wrote on MMCXVIII September
MCMXCIII in <URL:news:376BAFD4.9BBF6C92@okay.net>:
&& 
&& i tried to show the information stty gives me about the serial interface
&& on a webpage. When I started it via CGI I only got information for the
&& stty options  '--help' and '-version'. When I started the programm on
&& the shell it everything is okay.

So, what is your Perl question?

&& My system: Linux 6.0, Apache Webserver


Wow! Linux 6.0! You must be years ahead of the Linux development team,
who recently announced that 2.4 will be available later this year.


Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 19 Jun 1999 15:40:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Recommend a simple Online database?
Message-Id: <slrn7mo00r.37n.abigail@alexandra.delanet.com>

David Cassell (cassell@mail.cor.epa.gov) wrote on MMCXVIII September
MCMXCIII in <URL:news:376BFA3F.B66581D9@mail.cor.epa.gov>:
\\ Abigail wrote:
\\ > [snippage] 
\\ > AFAIK, there's no way to bring a database offline in a graceful way.
\\ 
\\ I like to kick the network connection loose with my back foot
\\ while executing a perfect tour jete.  Very graceful, IIDSSM.


I doubt that will make your database go 'offline'. It might get 
corrupted though. (But that's why you use local disks, right?)


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 20 Jun 1999 01:13:56 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: simple question about array
Message-Id: <7khf79$dbp$1@monet.op.net>

In article <7kgp30$481$1@gellyfish.btinternet.com>,
Jonathan Stowe  <gellyfish@gellyfish.com> wrote:
>On Wed, 16 Jun 1999 21:24:49 -0400 sydney qiu wrote:
>> Hi, I am a beginner of perl and basiclly teaching myself from the book
>> Learning Perl. In chapter there is an example @array=(1.3 .. 6.1) is
>> equal to (1.3, 2.3, 3.3,4.3, 5.3)
>
>I dont believe that 'Learning Perl' says that the range operator work
>on anything but integers - of course I might be wrong in that. 

On page 49 of _Learning Perl_, second edition, it says (and I quote):

	(1.3 .. 6.1) # same as (1.3,2.3,3.3,4.3,5.3)

What do you know?  The situation is exactly as Sydney said.




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

Date: Sun, 20 Jun 1999 01:19:13 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Sort
Message-Id: <7khfhd$dd6$1@monet.op.net>

In article <7kh50g$7ac$1@news.monmouth.com>,
Matt <splinter@monmouth.com> wrote:
>After they were sorted: 100, 101, 123, 55
>
>Why didn't the 55 come first?

Sort sorts alphabetically by default.

55 comes after 123 for the same reason that EE comes after ABC.

Please look in the on-line manual next time.  If yo uhad looked at the
description of the `sort' function in the manual, you would have seen:

                   # sort numerically ascending
                   @articles = sort {$a <=> $b} @files;




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

Date: Sun, 20 Jun 1999 13:12:41 +1000
From: "Pen and Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: State machine tool
Message-Id: <K1Za3.1132$jW.8117@ozemail.com.au>

Welcome to the FSM (Finite State Machine) club!

State Machine-like modules fall under the DFA (Discrete Finite Automata)
prefix in CPAN.
Names already used are DFA::Kleene and DFA::Command. The latter, mine,
contains
Command.pm and Generate.pm, which together generate and run state machine
programs.

Please consider using the DFA:: prefix, and giving your module a name which
does not clash.

--
Cheers
Pen and Ron Savage
rpsavage@ozemail.com.au
http://www.ozemail.com.au/~rpsavage
Tramm Hudson wrote in message <7ke1h7$cmh@llama.swcp.com>...
>[posted and cc'd to Greg, who started this whole discussion]
>
>After the discussion of statemachines, closures, threads, and
>other topics, I've cleaned up my State Machine tool that handles
>the grungy parts of building and using state machines.  This is





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

Date: 19 Jun 1999 18:19:52 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: UNIX: ~name won't work on system() as expected
Message-Id: <yld7yrr7lz.fsf@windlord.stanford.edu>

Tom Christiansen <tchrist@mox.perl.com> writes:
> Rick Delaney <rick.delaney@home.com> writes:

>> Apparently <'$test'> is OWTDI (though it is very misleading).

> There seems to be some unannounced level of interpolation going on here.

Yes, that's extremely odd.  That should be globbing with the pattern
C<$test>, not with the contents of the variable $test.  Why is glob
double-interpolating?

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Sun, 20 Jun 1999 02:01:25 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: UNIX: ~name won't work on system() as expected
Message-Id: <376C4B39.FC22CECF@home.com>

[posted & mailed]

Russ Allbery wrote:
> 
> Tom Christiansen <tchrist@mox.perl.com> writes:
> > Rick Delaney <rick.delaney@home.com> writes:
> 
> >> Apparently <'$test'> is OWTDI (though it is very misleading).
> 
> > There seems to be some unannounced level of interpolation going on here.
> 
> Yes, that's extremely odd.  That should be globbing with the pattern
> C<$test>, not with the contents of the variable $test.  Why is glob
> double-interpolating?

I don't think it is.  When using <*.c>, the <> are the quote characters
so everything between them is interpolated.  So

   <*.$ext>

is the same as

    glob "*.$ext"

And saying

   <'*.$ext'>

would be the same as

    glob qq{'*.$ext'};

For some reason, though, it appears that '*.c' is being interpreted (by
the shell?) as *.c.  I'm not sure why this is, or even if it's bad or
not.

I tried it with just one quote and got errors from sh (Linux):

sh: unexpected EOF while looking for `''
sh: -c: line 2: syntax error

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 19 Jun 1999 19:46:22 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Urgent and important : CSV !!!
Message-Id: <Pine.GSO.4.02A.9906191941060.20930-100000@user2.teleport.com>

On 20 Jun 1999, Wappinger Bailey wrote:

> Bruno Baguette explains it all:
> 
> :I have to present an examination in 4 days...
> 
> This is very funny. I've seen this group's residents espouse the
> "We're not here to do your homework for you" paradigm frequently, but
> I never thought it would apply literally...

It used to be that, by the time someone had gotten into college, they had
learned to disguise their request so that it didn't look so much like they
were asking for help on their homework. Aren't the public schools teaching
the basics anymore? Ptsch.

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 20 Jun 1999 03:23:29 GMT
From: Lamarck Pauline <revjack@radix.net>
Subject: Re: Urgent and important : CSV !!!
Message-Id: <7khmrh$d38$2@news1.Radix.Net>
Keywords: Hexapodia as the key insight

Tom Phoenix explains it all:

:It used to be that, by the time someone had gotten 
:into college, they had learned to disguise their 
:request so that it didn't look so much like they
:were asking for help on their homework. Aren't the 
:public schools teaching the basics anymore? Ptsch. 

Anyone ever tempted to give *bad* advice to these pleas, 
just to break the monotony?


#!/bin/sh /usr/local/bin/perl -c
$filename = '$filename';chomp $$filename;
`cat file.csv > temp.doc` && die;
pop @INC;
use DBI;
open (<FILENAME>, join(
   .
   .
   .

I can't go on.



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

Date: Sat, 19 Jun 1999 12:20:02 +0200
From: "Oreg Dixie" <maistro@swi.hu>
Subject: writing at mark from print
Message-Id: <7kg26g$g9k$1@pollux.matav.net>

Hi!

How can I write out @-mark from print?

Because print "me@domain.net"; doesn't work.

Thanks in advance!

Flatline




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

Date: Sat, 19 Jun 1999 22:45:22 -0400
From: Bob Walton <walton@frontiernet.net>
To: Oreg Dixie <maistro@swi.hu>
Subject: Re: writing at mark from print
Message-Id: <376C55C2.BF784A29@frontiernet.net>

Oreg Dixie wrote:

> ...
> How can I write out @-mark from print?
>
> Because print "me@domain.net"; doesn't work.
>

 .Try:

print "me\@domain.net";

The @ character is "interpolated" in double-quoted strings, just like $
is.
 ..



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

Date: Sat, 19 Jun 1999 20:12:56 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: writing at mark from print
Message-Id: <Pine.GSO.4.02A.9906192008030.20930-100000@user2.teleport.com>

On Sat, 19 Jun 1999, Oreg Dixie wrote:

> How can I write out @-mark from print?

Include it among the parameters to print, just as you would with any other
character.

> Because print "me@domain.net"; doesn't work.

That's because you need to see what the perlop manpage says about 
the qq"" operator. 

But wasn't Perl's diagnostic message on this clear enough? Of course,
error messages, by their very nature, have to be concise. If any error
message from perl doesn't tell you enough, the perldiag manpage will help
you out with a more detailed explanation.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 19 Jun 1999 20:32:47 -0700
From: moseley@best.com (Bill)
Subject: Re: writing at mark from print
Message-Id: <MPG.11d600bf54575fb098974f@206.184.139.132>

In article <376C55C2.BF784A29@frontiernet.net>, walton@frontiernet.net 
says...
> > Because print "me@domain.net"; doesn't work.
> 

Since double quotes then you must want something to be interpolated?  So 
@domain must be a list you have defined and now want to be printed?

> print "me\@domain.net";

I like to use single quotes.  Perl works hard enough as is.  Why give it 
extra work? ;)


-- 
Bill Moseley mailto:moseley@best.com


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

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

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