[15915] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3328 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 12 11:05:29 2000

Date: Mon, 12 Jun 2000 08: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: <960822312-v9-i3328@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 12 Jun 2000     Volume: 9 Number: 3328

Today's topics:
    Re: "list slice" vs "array slice" [was: Dummy Variable  (Randal L. Schwartz)
    Re: "list slice" vs "array slice" [was: Dummy Variable  (jason)
        Beginner's mySQL Tutorial? <raphaelp@nr1webresource.com>
    Re: Beginner's mySQL Tutorial? <blah@nospam.com>
    Re: Beginner's mySQL Tutorial? <raphaelp@nr1webresource.com>
    Re: Beginner's mySQL Tutorial? <blah@nospam.com>
    Re: Beginner's mySQL Tutorial? <jonesma6@cf.ac.uk>
    Re: Beginner's mySQL Tutorial? (brian d foy)
    Re: Beginner's mySQL Tutorial? (jason)
    Re: Beginner's mySQL Tutorial? <care227@attglobal.net>
    Re: Larry Rosler interview on perl.com! <care227@attglobal.net>
        Mystery Regex <mc@backwoods.org>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: NEWBIE cgi question please help! <care227@attglobal.net>
    Re: NEWBIE cgi question please help! <care227@attglobal.net>
    Re: now this is strange... <aqumsieh@hyperchip.com>
        Perl and ASP ? how to... <PatMontgOnkenJazz@t-online.de>
    Re: perl script for replacing delimiters in WEB logs (brian d foy)
        Perl/Pipe problem... spoorancher@my-deja.com
    Re: Problem using only Global Variables? (Tad McClellan)
        Receiving parameters from the command line <dpalmeNOSPAM@unitedtraffic.com>
    Re: Receiving parameters from the command line <tony_curtis32@yahoo.com>
    Re: SCRIPT TO SEND SMS <guy@crossflight.co.uk>
    Re: SCRIPT TO SEND SMS <ptb@oboe.it.uc3m.es>
    Re: SCRIPT WRITERS HELP NEEDED <care227@attglobal.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 12 Jun 2000 07:28:17 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: "list slice" vs "array slice" [was: Dummy Variable avoidance]
Message-Id: <m1k8fvx9by.fsf@halfdome.holdit.com>

>>>>> "jason" == jason  <elephant@squirrelgroup.com> writes:

jason> I take your point but always thought of these as the same thing .. just 
jason> that

jason>   subName()[]

jason> needed some parens in order to resolve the ambiguity .. whereas with

jason>   @arrayName[]

jason> there's no ambiguity .. it is the same thing to write

jason>   (@arrayName)[]

jason> so .. is that then a "list slice" ? .. or an "array slice" ?

jason> my contention is that there is no real "array slice" (I used the term 
jason> because it was the only one there in the docs) .. only a "list slice" .. 
jason> and what we think of as an array slice really involves first generating 
jason> a list from the array .. then taking a slice (a "list slice" if you must 
jason> :)

jason> ie. they are functionally equivalent .. just that you don't HAVE to use 
jason> parens when taking a slice from an array .. calling them functionally 
jason> different would be like calling

I suspect that 

        @array[4,5,6]

Doesn't have to make an additional copy of all the items in @array,
compared with

        ( @array )[4,5,6]

which does.  However, it's *possible* that the second is recognized
as a special case and optimized to be the first.  I'm not certain.
(Think if @array had 100000 elements - which would you rather do?)

So yes, a list slice and an array slice are functionally different
beasts.

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 12 Jun 2000 14:55:23 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: "list slice" vs "array slice" [was: Dummy Variable avoidance]
Message-Id: <MPG.13af970f70e96cd0989733@news>

Randal L. Schwartz writes ..
>>>>>> "jason" == jason  <elephant@squirrelgroup.com> writes:
>
>jason> I take your point but always thought of these as the same thing .. just 
>jason> that
>
>jason>   subName()[]
>
>jason> needed some parens in order to resolve the ambiguity .. whereas with
>
>jason>   @arrayName[]
>
>jason> there's no ambiguity .. it is the same thing to write
>
>jason>   (@arrayName)[]
>
>jason> so .. is that then a "list slice" ? .. or an "array slice" ?
>
>jason> my contention is that there is no real "array slice" (I used the term 
>jason> because it was the only one there in the docs) .. only a "list slice" .. 
>jason> and what we think of as an array slice really involves first generating 
>jason> a list from the array .. then taking a slice (a "list slice" if you must 
>jason> :)
>
>jason> ie. they are functionally equivalent .. just that you don't HAVE to use 
>jason> parens when taking a slice from an array .. calling them functionally 
>jason> different would be like calling
>
>I suspect that 
>
>        @array[4,5,6]
>
>Doesn't have to make an additional copy of all the items in @array,
>compared with
>
>        ( @array )[4,5,6]
>
>which does.  However, it's *possible* that the second is recognized
>as a special case and optimized to be the first.  I'm not certain.
>(Think if @array had 100000 elements - which would you rather do?)

just did some benchmarking .. and it would appear that no such 
optimisation is done in 5.005_03 .. I'm surprised and shocked and very 
very wrong

>So yes, a list slice and an array slice are functionally different
>beasts.

I stand very much corrected .. those parens are pretty powerful things

thanks for taking the time Tad and Randal .. I'm another step closer 
*8^)

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Mon, 12 Jun 2000 15:30:12 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Beginner's mySQL Tutorial?
Message-Id: <8i2ojk$c9m$1@news.online.de>

Hi,

i'm looking for a tutorial that will teach me how to search data in an mySQL
database, implement them into my scripts and read all the data into
variables. Any links?

Raphael Pirker
raphaelp@nr1webresource.com





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

Date: Mon, 12 Jun 2000 15:35:00 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <3944E704.115DFDE1@nospam.com>

Rapahel,

Raphael Pirker wrote:
> i'm looking for a tutorial that will teach me how to search data in 
> an mySQL database, implement them into my scripts and read all 
> the data into variables. Any links?

  There is a good collection of Perl modules designed in order to allow
programmers to access to a lot of DBMS.  You have to get the user
front-end, called DBI.pm (http://www.cpan.org) and the back-end related
to your DBMS, called DBD::mysql.pm (http://www.tcx.se or even the CPAN).


	Best regards,
		Marco


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

Date: Mon, 12 Jun 2000 15:38:55 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <8i2p3u$cev$1@news.online.de>

Thanks! But is there a Tutorial on Modules or something like that? My Perl
knowledge is *very* limited... :-)

Marco Natoni <blah@nospam.com> wrote in message
news:3944E704.115DFDE1@nospam.com...
> Rapahel,
>
> Raphael Pirker wrote:
> > i'm looking for a tutorial that will teach me how to search data in
> > an mySQL database, implement them into my scripts and read all
> > the data into variables. Any links?
>
>   There is a good collection of Perl modules designed in order to allow
> programmers to access to a lot of DBMS.  You have to get the user
> front-end, called DBI.pm (http://www.cpan.org) and the back-end related
> to your DBMS, called DBD::mysql.pm (http://www.tcx.se or even the CPAN).
>
>
> Best regards,
> Marco




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

Date: Mon, 12 Jun 2000 15:47:59 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <3944EA0F.216F317A@nospam.com>

Raphael,

Raphael Pirker wrote:
> Thanks! But is there a Tutorial on Modules or something like that? 
> My Perl knowledge is *very* limited... :-)

  Of course: the DBI module is well-documented.  However, a minimal
knowledge of what DDL and DQL are is required.


	Best regards,
		Marco


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

Date: Mon, 12 Jun 2000 15:24:52 +0100
From: Mike Jones <jonesma6@cf.ac.uk>
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <3944F2B4.D365DF50@cf.ac.uk>

I'd recommend buying Programming the Perl DBI by Alligator Descartes
and Tim Bunce, published by O'Reilly. It also includes a chapter that
deals with SQL.

I'm currently writing script that query a MySQL database, and I'm
finding the book priceless....well, actually it cost me £25 :-D

http://www.oreilly.com/catalog/perldbi/

Mike Jones
Computing Centre,
Cardiff University



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

Date: Mon, 12 Jun 2000 10:40:24 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <brian-1206001040240001@39.sanjose-08-09rs16rt.ca.dial-access.att.net>

In article <3944EA0F.216F317A@nospam.com>, mnatoni@rumbanet.it wrote:

>Raphael Pirker wrote:
>> Thanks! But is there a Tutorial on Modules or something like that? 
>> My Perl knowledge is *very* limited... :-)

>  Of course: the DBI module is well-documented.  However, a minimal
>knowledge of what DDL and DQL are is required.

i have no idea what DDL or DQL are, but i can use the DBI module
quite effectively nonetheless.

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

Date: Mon, 12 Jun 2000 14:58:14 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <MPG.13af97b87798a041989734@news>

brian d foy writes ..
>In article <3944EA0F.216F317A@nospam.com>, mnatoni@rumbanet.it wrote:
>
>>Raphael Pirker wrote:
>>> Thanks! But is there a Tutorial on Modules or something like that? 
>>> My Perl knowledge is *very* limited... :-)
>
>>  Of course: the DBI module is well-documented.  However, a minimal
>>knowledge of what DDL and DQL are is required.
>
>i have no idea what DDL or DQL are, but i can use the DBI module
>quite effectively nonetheless.

glad I wasn't the only one .. I'm guessing that DQL was meant to be SQL 
 .. does 'DDL' eq 'Data Definition Language' ?

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Mon, 12 Jun 2000 10:58:46 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Beginner's mySQL Tutorial?
Message-Id: <3944FAA6.56F3AC67@attglobal.net>

brian d foy wrote:
> 
> i have no idea what DDL or DQL are, but i can use the DBI module
> quite effectively nonetheless.
> 

DDL - data definition language
DQL - data query language

Someone was trying to be fancy.


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

Date: Mon, 12 Jun 2000 10:29:03 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3944F3AF.F1A2C6E0@attglobal.net>

lvirden@cas.org wrote:
>(...) 
> 
> What exactly do people expect to 'standardize'?  The primary reason that other
> languages go through ANSI standardization is that the language community
> face multiple implementations which differ in deployments due to a lack
> of documentations, and specifically two or more of the implementations
> differ in behavior (typically in undefined areas).

As has been pointed out many times in this thread, standards enforce 
behaviour.  Currently, there is nothing that says, for example, that 
perl 8 will not support regular expressions, or will support them in 
a different manner.  Logic says it won't happen, but thats it.  Larry 
Wall could go silly and change the entire syntax if he really felt
like it.
 
> What perl implementations exist with differing behaviors?  I thought that
> there was a single perl source tree which was then compiled on each platform.
> If that is the case, then the base perl code is the 'standard'.  

Yes, there is one interpreter, which is wonderfull.  The problem is
that the behaviour of the language is not always a known quantity.
Thats what can benefit from standards more.

> would someone want to spend several years of buracratic rigamarole to get
> an official 'stamp' confirming that the creator's text book on the workings
> of perl was in fact the standard?

So that when the Geek Cruise ship sinks and all the implementors drown, 
there will still be a perl and a Perl?


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

Date: Mon, 12 Jun 2000 10:01:45 -0400
From: MC <mc@backwoods.org>
Subject: Mystery Regex
Message-Id: <3944ED49.AAE1481A@backwoods.org>

Ok im totally stumped. I have tried every debug trick I can think of and still
cant tell why this regex aint matching right (or is it?).

Please someone tell me why only the 2nd of these four matches is matching....

MC

#----[ Code Start ]----

$x = ",";

$_ = "custnum,db,item,qty,cardtype,cardnum,shipname,shipaddr1,shipaddr2";
@order = split($x,$_);
@order{@order} = @order;

($test) =
/^(?:[^$x]*$x){6,6}($order{shipname}$x$order{shipaddr1}$x$order{shipaddr2})/;
print "Addr1&2:\n[$_]\n[$test]\n\n";

($test) = /^(?:[^$x]*$x){6,6}($order{shipname}$x$order{shipaddr1}$x)/;
print "Addr1:\n[$_]\n[$test]\n\n";

$order{shipname} = "";
$order{shipaddr1} = "";
$order{shipaddr2} = "";

($test) =
/^(?:[^$x]*$x){6,6}($order{shipname}$x$order{shipaddr1}$x$order{shipaddr2})/;
print "BlankAddr1&2:\n[$_]\n[$test]\n\n";

($test) = /^(?:[^$x]*$x){6,6}($order{shipname}$x$order{shipaddr1}$x)/;
print "BlankAddr1:\n[$_]\n[$test]\n\n";

#----[ Code End ]----
-- 
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------


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

Date: Mon, 12 Jun 2000 13:11:10 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <sk9obednh51184@corp.supernews.com>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 05 Jun 2000 14:32:15 GMT and ending at
12 Jun 2000 13:32:52 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  236 (43.1% of all posters)
Articles: 408 (22.0% of all articles)
Volume generated: 660.3 kb (20.2% of total volume)
    - headers:    310.1 kb (6,428 lines)
    - bodies:     347.5 kb (11,888 lines)
    - original:   235.7 kb (8,477 lines)
    - signatures: 2.4 kb (70 lines)

Original Content Rating: 0.678

Averages
========

Posts per poster: 1.7
    median: 1.0 post
    mode:   1 post - 169 posters
    s:      2.4 posts
Message size: 1657.2 bytes
    - header:     778.2 bytes (15.8 lines)
    - body:       872.1 bytes (29.1 lines)
    - original:   591.7 bytes (20.8 lines)
    - signature:  5.9 bytes (0.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   26    43.5 ( 23.0/ 20.5/  8.6)  "Raphael Pirker" <raphaelp@nr1webresource.com>
   14    24.9 ( 15.2/  9.7/  5.9)  "SteveSingletary" <steve@gte.net>
   12    28.3 (  9.6/ 18.7/  9.9)  |Odo| <jasonb885@my-deja.com>
    7    11.5 (  3.7/  7.9/  3.5)  John Gehman <jdg28@pantheon.yale.edu>
    7     8.0 (  5.5/  2.5/  1.5)  "TheEx0rcist" <TheEx0rcist@fanclub.org>
    7    15.5 (  5.9/  9.6/  3.2)  "Trevor Sky Garside" <trevor@trevorsky.com>
    7    16.4 (  5.2/ 11.2/  3.9)  Christopher Hahn <chahn@eleganceintime.com>
    6     8.9 (  3.9/  5.0/  2.5)  "J. Joseph Yusko" <boogiemonster@usa.net>
    6    10.6 (  5.5/  5.2/  2.7)  "Mike Solomon" <mike.solomon@eps.ltd.uk>
    5     7.2 (  3.5/  3.7/  1.3)  Tom Bates <tfbiv@SPAMMENOTerols.com>

These posters accounted for 5.2% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  43.5 ( 23.0/ 20.5/  8.6)     26  "Raphael Pirker" <raphaelp@nr1webresource.com>
  28.3 (  9.6/ 18.7/  9.9)     12  |Odo| <jasonb885@my-deja.com>
  24.9 ( 15.2/  9.7/  5.9)     14  "SteveSingletary" <steve@gte.net>
  16.4 (  5.2/ 11.2/  3.9)      7  Christopher Hahn <chahn@eleganceintime.com>
  15.5 (  5.9/  9.6/  3.2)      7  "Trevor Sky Garside" <trevor@trevorsky.com>
  14.3 (  2.0/ 12.3/  7.5)      2  Guy Resh <gresh@earthlink.net>
  11.5 (  3.7/  7.9/  3.5)      7  John Gehman <jdg28@pantheon.yale.edu>
  10.6 (  5.5/  5.2/  2.7)      6  "Mike Solomon" <mike.solomon@eps.ltd.uk>
   9.5 (  0.9/  8.6/  0.3)      1  Tait Milliken <jtmilliken@rvjintl.com>
   8.9 (  3.9/  5.0/  2.5)      6  "J. Joseph Yusko" <boogiemonster@usa.net>

These posters accounted for 5.6% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  1.6 /  1.6)      4  SASprgmr <sasprgmr@aol.com>
1.000  (  1.7 /  1.7)      4  deno <jdNOjdSPAM@syncon.ie.invalid>
1.000  (  2.1 /  2.1)      3  Kevin Ferron <kferron@iwon.com>
1.000  (  0.5 /  0.5)      3  "Robert Young" <roberty@idirect.com>
1.000  (  0.7 /  0.7)      3  theowood@my-deja.com
1.000  (  3.1 /  3.1)      5  JenX <jeniNOjeSPAM@hotbot.com.invalid>
0.955  (  2.0 /  2.1)      3  Vincent <szhzp2@no.spam.com>
0.896  (  2.7 /  3.0)      3  "Neo-X" <jaggers295@hotmail.com>
0.764  (  1.4 /  1.9)      3  "Graham Wood" <graham.wood@iona.com>
0.739  (  2.1 /  2.8)      3  Juha-Pekka Peltomaki <jupepe@jyu.fi>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.455  (  1.3 /  2.8)      3  "Chris Rosebrugh" <crosebrugh@inetarena.com>
0.441  (  3.5 /  7.9)      7  John Gehman <jdg28@pantheon.yale.edu>
0.417  (  8.6 / 20.5)     26  "Raphael Pirker" <raphaelp@nr1webresource.com>
0.387  (  2.4 /  6.1)      4  Mike <Michael.Bukowski@usa.xerox.com>
0.355  (  0.8 /  2.3)      3  "Firehawk" <bronsn@hotmail.com>
0.354  (  1.3 /  3.7)      5  Tom Bates <tfbiv@SPAMMENOTerols.com>
0.351  (  3.9 / 11.2)      7  Christopher Hahn <chahn@eleganceintime.com>
0.332  (  3.2 /  9.6)      7  "Trevor Sky Garside" <trevor@trevorsky.com>
0.309  (  0.4 /  1.2)      3  Xavier Tardy <xavier.tardy@alcatel.fr>
0.231  (  0.8 /  3.5)      3  Jason Brown <jrbrown@cts.com>

32 posters (13%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      55  comp.lang.perl.modules
      19  comp.lang.perl
       7  alt.perl
       7  comp.os.linux.networking
       5  comp.unix.shell
       4  comp.os.linux.help
       3  comp.lang.java.javascript
       3  it.comp.lang.javascript
       3  comp.lang.javascript
       3  mailing.database.mysql

Top 10 Crossposters
===================

Articles  Address
--------  -------

       6  Marcos Lloret <marcos@second.ival.es>
       5  Tait Milliken <jtmilliken@rvjintl.com>
       5  felix.staehlin@kuoni.ch
       3  "Neo-X" <jaggers295@hotmail.com>
       3  "Steve Fulton" <cerberus40@hotmail.com>
       3  Sebastien THOMAS <Sebastien.THOMAS@none.net>
       2  "Noah Couture" <noah@coutureconsulting.com>
       2  "Stefan T." <stefan.thaler@gmx.net>
       2  Ray Compton <compton@unicc.org>
       2  "Raphael Pirker" <raphaelp@nr1webresource.com>


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

Date: Mon, 12 Jun 2000 10:14:26 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: NEWBIE cgi question please help!
Message-Id: <3944F042.FF067BD3@attglobal.net>

Christopher Hahn wrote:
> 
> Trevor,
> 
> The poeple here would tell you to use Perl!

I'll give you three guesses as to why.  
The only clue would be from the message header:


 Newsgroups: comp.lang.perl.misc

Anything relative to C in that? =)


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

Date: Mon, 12 Jun 2000 10:16:22 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: NEWBIE cgi question please help!
Message-Id: <3944F0B6.AFB574A8@attglobal.net>

Trevor wrote:
> 
> This may not be the right place for this question but i'm hoping at least
> one of you people out there can help me out. 

It certainly isn't.  I'll help you out by telling you the proper 
group.  Good enough?  

comp.infosystems.www.authoring.cgi

Do try to stay on topic.  Some of us pay hourly for our Internet
connections _and_ phone connections.


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

Date: Mon, 12 Jun 2000 14:37:03 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: now this is strange...
Message-Id: <7aog57aru8.fsf@merlin.hyperchip.com>


"multiplexor" <abuse@localhost> writes:

> I know  eval{system "\rm -rf /";}  is dangerous. Just curious about how
> dangerous this is:
> 
> eval{$system "\rm -rf /"; = $hash{system "\rm -rf /";} }
> 
> Can you teach me more?

What you wrote does not parse. Do you have a typo, maybe?

--Ala


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

Date: Mon, 12 Jun 2000 15:20:16 +0200
From: "Nikolai Onken" <PatMontgOnkenJazz@t-online.de>
Subject: Perl and ASP ? how to...
Message-Id: <8i2o1q$ucl$18$1@news.t-online.com>

hey,

I have a short questrion.
I tried to write a script which checks my alladvantage account for new
referals etc. everytime I run it without using the browser. Now my problem
is that the alladpages are in asp - so is there a way that I automaticaly
log into the account and read the sites (stats) content into an array ?
I really have no idea how to make this since I don't find a solution in
perdoc - and a diferent thing: the alladserver is https.
Anyone who already found a solution for that problem ?
Would be really cool if someone can give me a hint how to solve that
problem.
cya later...

nikolai




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

Date: Mon, 12 Jun 2000 10:45:08 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: perl script for replacing delimiters in WEB logs
Message-Id: <brian-1206001045120001@39.sanjose-08-09rs16rt.ca.dial-access.att.net>

In article <8i2gs4$uj8$1@nnrp1.deja.com>, Rene Nyffenegger <renenyffenegger@my-deja.com> wrote:

>
>> s/" "/"|"/g;
>> s/"/n"/"&"/g

>2 in perl, you don't quote strings in REs, so, it's / / for
>  a blank, not /" "/

you don't want to replace every space, just the ones that show
up between quotes (i.e. the ending quote of the last thing
and the next thing).

>3 Are you sure that your logfile doesn't contain blanks within
>  strings (such as "word1 word2"). Off course, these blanks
>  would be replaced with bars as well

hence, the original regular expression.

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

Date: Mon, 12 Jun 2000 14:26:28 GMT
From: spoorancher@my-deja.com
Subject: Perl/Pipe problem...
Message-Id: <8i2ru5$5k6$1@nnrp1.deja.com>



Hello.  I've got an odd problem and I was wondering if anyone else has
seen it, and perhaps if s/he knows a solution.  Here it is.

I run the following script (I've tried it at the command line w/ the
same result).

#!/usr/bin/perl
exit(system("cat myfile.txt | cmd1 | cmd2")>>8);

cmd1 is written in Perl, and reads from stdin and writes to stdout
using print.  Cmd2 is written in java, but the problem happens no
matter what app I throw in there (java, c, perl, etc...).  The problem
is this: when cmd2 runs to completion, everything works as expected;
however, when cmd2 exits w/o reading all of stdin, cmd1 is left blowing
in the wind; that is, it becomes a zombie and is inhereted by init.

I believe this is only happening when cmd1 is a Perl app; for anything
else, it seems to work as expected.

Any help would be appreciated.

Dave

-------------------------
David MacCormack


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 12 Jun 2000 08:01:22 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Problem using only Global Variables?
Message-Id: <slrn8k9k8i.6qi.tadmc@magna.metronet.com>

On Mon, 12 Jun 2000 07:46:44 -0400, Ryan & Treena Carrier <ryanc@nci1.net> wrote:
>Is there a problem using only global variables? 


Yes.

Global variables can make it very difficult to debug your programs.

One of the most basic rules of thumb in a CS curriculum
is to avoid global variables whenever possible (and it
is nearly always possible).


Global variables are bad!

Don't be bad, control the scope of your variables, or spend a
whole lot more time troubleshooting than you need to...


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 12 Jun 2000 14:00:30 GMT
From: "D.W." <dpalmeNOSPAM@unitedtraffic.com>
Subject: Receiving parameters from the command line
Message-Id: <01bfd476$39896bc0$cf0114ac@raptor.unitedtraffic.com>

I know this is probably a simple question and one that has been asked a
thousand times over, but I'm very new to perl and if someone would bear
with me and provide the answer I would be most appreciative.

I thought that if you call a perl program with say two parameters in the
following manner:  perl test.pl 1 2

The parameters of 1 and 2 would be added to the @ARGV array.  I've tried to
extract those parameters using the following statement 
if (scalar(@ARGV) == 2) {
	one = @ARGV(shift);
	two = @ARGV(shift);
}

but I get an error on the first IF line.

Would someone explain to me what the hell I'm doing wrong ?

Douglas



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

Date: 12 Jun 2000 09:10:14 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Receiving parameters from the command line
Message-Id: <87pupnj8hl.fsf@limey.hpcc.uh.edu>

>> On 12 Jun 2000 14:00:30 GMT,
>> "D.W." <dpalmeNOSPAM@unitedtraffic.com> said:

> I thought that if you call a perl program with say two
> parameters in the following manner: perl test.pl 1 2

> The parameters of 1 and 2 would be added to the @ARGV
> array.  I've tried to extract those parameters using the
> following statement if (scalar(@ARGV) == 2) { one =
> @ARGV(shift); two = @ARGV(shift); }

> but I get an error on the first IF line.

> Would someone explain to me what the hell I'm doing
> wrong ?

You just need to index the @ARGV array, e.g.

    my $one = $ARGV[0];
    my $two = $ARGV[1];

or with shift

    my $one = shift;
    my $two = shift;       # operates on ARGV by default

However, it's more idiomatic to let perl do the work,

    my ($one, $two) = @ARGV;

For testing the size of the array (to see if the
parameters are really there) perl does the Right Thing
again,

    if ( @ARGV == ... ) { ... }

since that's a scalar context anyway.  Alternatively you
can blindly pull things out of ARGV as above and test the
values with defined().

More info:

perldoc -f shift
perldoc perlvar
perldoc -f defined
perldoc perldsc

hth
t
-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Mon, 12 Jun 2000 15:38:34 +0100
From: Guy Dawson <guy@crossflight.co.uk>
To: Marcos Lloret <marcos@second.ival.es>
Subject: Re: SCRIPT TO SEND SMS
Message-Id: <3944F5EA.A2A1993C@crossflight.co.uk>



Marcos Lloret wrote:
> 
> hi,
> 
>     i was looking for a script that sends a sms message instead of a
> email message. how can i do it??
> 
> instead of this:
> mail whatever@lll.com << EOF
> subject: new user
> EOF
> 
> how can i make the same thing but sending a sms???

I've used 'sendpage' in the past to do this. It needs a modem and
depending on the server you're connecting to a userid and password.

Guy
-- --------------------------------------------------------------------
Guy Dawson                    I.T. Manager              Crossflight Ltd
guy@crossflight.co.uk         07973  797819                01753 776104


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

Date: 12 Jun 2000 14:50:15 GMT
From: "Peter T. Breuer" <ptb@oboe.it.uc3m.es>
Subject: Re: SCRIPT TO SEND SMS
Message-Id: <8i2tb7$q5e$1@news.inf.uc3m.es>

In comp.os.linux.misc Guy Dawson <guy@crossflight.co.uk> wrote:


: Marcos Lloret wrote:
:>     i was looking for a script that sends a sms message instead of a
:> email message. how can i do it??

Mail to an SMS gateway. Or do you have a wireless transmitter handy?

: I've used 'sendpage' in the past to do this. It needs a modem and
: depending on the server you're connecting to a userid and password.

GSM modems are not commonplace (I have one). Use a gateway.

Peter


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

Date: Mon, 12 Jun 2000 10:20:10 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: SCRIPT WRITERS HELP NEEDED
Message-Id: <3944F19A.AC43FBED@attglobal.net>

Tom Phoenix wrote:
> 
> > The person, who designed and wrote the HTML coding, does not
> > have the experience to complete the project with the scripting.
> 
> That, is a shame. He should, have thought of that, before he started on
> the design. Does he know though, where to put commas, to make an
> appositive?
> 

Oh my.  I have to thank you for the laugh.  I nearly fell off my 
chair reading this bit!


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

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


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