[10587] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4179 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 9 10:07:59 1998

Date: Mon, 9 Nov 98 07:00:30 -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           Mon, 9 Nov 1998     Volume: 8 Number: 4179

Today's topics:
    Re: $a = $a <garethr@cre.canon.co.uk>
        2nd posting: why do I get in this case: "untie attempte ronald_f@my-dejanews.com
    Re: Command Line Parameters? (Tad McClellan)
    Re: Command Line Parameters? (Clay Irving)
        file contains files <binder@cs.tu-berlin.de>
    Re: file contains files (Larry Rosler)
    Re: file contains files (Clay Irving)
    Re: How do you delete files in a directory? <roberto@keltia.freenix.fr>
    Re: How to run perl scripts written in C++ on windows? <jason.holland@dial.pipex.com>
    Re: Installation Help <mikane@shell3.ba.best.com>
    Re: Making a Counter <garethr@cre.canon.co.uk>
        mod_perl question <csprout@3rivers.net>
        Multi-platform Perl compiles <kavian@nortel.ca>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: newbie question <rootbeer@teleport.com>
    Re: newbie question grahams@wpds.com
    Re: Not to start a language war but.. <garry@sage.att.com>
    Re: Opening files <webmaster@fccj.org>
    Re: Perl script on Unix??? (Peter J. Kernan)
        Removing ^K (Andy Davidson)
        Resouce for PERL script in HTML files <mlabor@mexico.com>
        Resource for activescpiting in perl <mlabor@mexico.com>
        Sending SOLICITED bulk mail. angus@od-site.com
    Re: Shared CGI.pm from various directories bill_mcintyre@my-dejanews.com
    Re: Shared CGI.pm from various directories bill_mcintyre@my-dejanews.com
    Re: shift in a list context (Tad McClellan)
        SpecPerl Mirror?? <bradley@frii.com>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
        Thanx! Re: opendir() VS glob - WAS Re: readdir bug (not <dtbaker-@busprod.com>
    Re: Why doesn't my perl compiler like this expression? (Sam Holden)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sun, 8 Nov 1998 16:48:51 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: $a = $a
Message-Id: <si7lx6p1u4.fsf@cre.canon.co.uk>

Todd Smith <tbsmith@viper.net> wrote:
> If Perl saw this line, would it do some assignment or ignore it like
> it would a comment?
> 
> $a = $a;

If Perl always optimised away this line, then the resulting code would
be incorrect.  When $a is a tied scalar I expect the code $a = $a; to
call the FETCH and STORE methods of the class $a is tied to.

-- 
Gareth Rees


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

Date: Sun, 08 Nov 1998 17:43:14 GMT
From: ronald_f@my-dejanews.com
Subject: 2nd posting: why do I get in this case: "untie attempted..."
Message-Id: <724l7i$fh7$1@nnrp1.dejanews.com>

Hi all!

This is my second posting to this problem (seems to really be a hard one). Any
suggestions or hints welcome!

I get the error message

  untie attempted while 1 inner references still exist at ./pt2 line 17.

wenn trying to untie a reference that is stored as a member in some class.

Why do I get this message in the following program? I can not see why there
should still exist a pending reference!

I use Perl 5.004 to run it:

#!/usr/local/bin/perl -w
package Demo;

use strict;
use Fcntl;
use NDBM_File;

sub _h { return shift->{_hash}; }

# simulate "Demo->new" for this small example
my $self = { _hash => {} }; # Real application has other members as well
bless $self,"Demo";

(tie(%{$self->_h}, "NDBM_File", "dh.db", O_RDWR|O_CREAT, 0640)) or die;

   if(tied %{$self->_h})
   {
      untie %{$self->_h}; # At this point the error occurs
   }



--
Ronald Fischer <ronald_f@my-dejanews.com>
http://ourworld.compuserve.com/homepages/ronald_fischer/

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


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

Date: Sun, 8 Nov 1998 12:10:27 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Command Line Parameters?
Message-Id: <jqm427.p21.ln@flash.net>

Ken Timlin (ktimlin@erols.com) wrote:
: Please excuse this if the answer is obvious but how
:      do I pass parameters from the command line to my Perl
:      script? I want to pass it two strings in the following
:      manner:

:            /usr/bin/myprogram string1 string2


   You have it right.

   That _is_ how you pass arguments to your script.

   Maybe you meant to ask "how do I access the arguments from
   within my script?"??

   A: They are in the @ARGV array.


:      When I try this, whatever I pass to my program is
:      always interpreted as a file name.


   Those are the semantics of the diamond operator (<>).

   If you don't want the semantics of the diamond operator,
   then don't use the diamond operator  ;-)



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


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

Date: 9 Nov 1998 09:11:17 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Command Line Parameters?
Message-Id: <726t65$lv7@panix.com>

In <3645CF26.DD2ED35@erols.com> Ken Timlin <ktimlin@erols.com> writes:

>Please excuse this if the answer is obvious but how
>     do I pass parameters from the command line to my Perl
>     script? I want to pass it two strings in the following
>     manner:

>           /usr/bin/myprogram string1 string2

>     When I try this, whatever I pass to my program is
>     always interpreted as a file name.

#!/usr/local/bin/perl -w

$string1 = $ARGV[0];
$string2 = $ARGV[1];

print "I got $string1 $string2\n";

[panix] ~% ./foo.pl foo bar
I got foo bar


-- 
Clay Irving
clay@panix.com


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

Date: Sun, 08 Nov 1998 16:08:50 +0100
From: Chris <binder@cs.tu-berlin.de>
Subject: file contains files
Message-Id: <3645B402.FDC72B5E@cs.tu-berlin.de>

Hello everbody !

A Newbie (that's me) has a been looking for a - I guess simple - answer,
but couln't find it, perhaps it's not that common.

Problem : I got a large file A, which contains filenames (incl. abs.
path).
My perl-script should : parse this file A, every line could be an
argument for "cat" or "print". (the resulting output will then be
filtered, but that's not the problem).

I'm looking for a possibility to assign a certain content of a file (for
instance a line) to a variable which then serve as a filename.

Like :
open (fileA);
varL=line(fileA);
open(varL);

thanks in advance

Chris



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

Date: Sun, 8 Nov 1998 07:24:53 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: file contains files
Message-Id: <MPG.10af579f4f215ed2989901@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <3645B402.FDC72B5E@cs.tu-berlin.de> on Sun, 08 Nov 1998 
16:08:50 +0100, Chris <binder@cs.tu-berlin.de> says...
 ... 
> I'm looking for a possibility to assign a certain content of a file (for
> instance a line) to a variable which then serve as a filename.
> 
> Like :
> open (fileA);
> varL=line(fileA);
> open(varL);

That pseudo-code is not Perl, so it's hard to guess what you've tried 
already.

Here are a couple of pointers:

Always check the result of an attempt to open a file:

    open FILEHANDLE, $filename or die "Couldn't open $filename. $!\n";

When you read a line from a file using the <FILEHANDLE> operator, the 
result includes the newline that terminates the line.  Use the 'chomp' 
function to get rid of it.

Good luck...

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 9 Nov 1998 09:16:10 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: file contains files
Message-Id: <726tfa$ma5@panix.com>

In <36461C82.C31E599C@cardinal.co.nz> Kelvin Price <kprice@cardinal.co.nz> writes:

>open RTFM, "<perldoc";

Should be:

 open RTFM, "<perldoc" or die "You didn't read the documentation!\n";

>while (<RTFM>) {
>    system("cat $_ | users_brain");
>};
>close RTFM;

>8-D
-- 
Clay Irving
clay@panix.com


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

Date: 8 Nov 1998 14:29:26 GMT
From: Ollivier Robert <roberto@keltia.freenix.fr>
Subject: Re: How do you delete files in a directory?
Message-Id: <7249s6$3db$1@keltia.freenix.fr>

[courtesy cc of this posting sent to cited author via email]

In article <CAW$VSA6LCR2Ewou@connected.demon.co.uk>,
Jerry Pank  <jerryp.usenet@connected.demon.co.uk> wrote:
> >--tom
>        replies to Ma*Tr**h Mime? 

I don't see this kind of article (Cleanfeed is great!) but I must say that
on another server which doesn't filter out HTML article, recent versions of 
trn4 (which TomC uses as I do), you can answer someone w/o seeing that it
was HTML.

trn4 is hiding that trash very nicely -- when you have the original article 
in your editor, it has been converted to plain text...
-- 
Ollivier ROBERT  -=- FreeBSD: The Power to Serve! -=-  roberto@freebsd.org
Usenet Canal Historique


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

Date: Sun, 08 Nov 1998 18:04:31 +0000
From: Jason Holland <jason.holland@dial.pipex.com>
Subject: Re: How to run perl scripts written in C++ on windows?
Message-Id: <3645DD2F.A772F804@dial.pipex.com>

Dale Sutcliffe wrote:
> 
> How to run perl scripts written in C++ on windows 98?
> 
> perl scripts work fine, but now I want to create scripts in C++.  how do
> I do this?

What?

Are you confusing Perl with CGI? They ARE different.

Don't you mean: How do I write CGI scripts in C++?

That's easy; learn C++.

Bye!

-- 
sub jasonHolland {
    my %hash = ( website =>
'http://dspace.dial.pipex.com/jason.holland/',
                 email   => 'jason.holland@dial.pipex.com' );
}


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

Date: 08 Nov 1998 18:33:44 GMT
From: <mikane@shell3.ba.best.com>
Subject: Re: Installation Help
Message-Id: <3645e408$0$12756@nntp1.ba.best.com>


Thanks for the help, I did install GNUmake, now have 
another problem.  

When I enter "make" I get an error message saying
"./qnx/ar: wlib: not found"

Below the code of the shell script "ar"

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

if [ $# -lt 3 ]; then
  use $0
  exit 1
fi
shift
library=$1
shift
wlib -p=32 -n $library `for i in $*; do echo "+$i \\c"; done`

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

What shall I do, using gcc 2.8.1



Mike






mikane@shell3.ba.best.com wrote:
: I am trying to compile/install Perl5.005_02. on Solaris x86.
: First I installed a pre-compiled compiler package (gcc).

: On the Perl distribution I ran "sh Configure -Dcc=gcc" and
: that executed without a hitch. 

: When I ran "make" I got the message "/make: not found."

: What can be the problema?

: Mike


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

Date: Sun, 8 Nov 1998 17:01:33 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Making a Counter
Message-Id: <si67cqp18y.fsf@cre.canon.co.uk>

"Pap" <Pap22@erols.com> wrote:
> I've tried some things I've seen in previous posts but have had no
> luck.  What I'm trying to do is simply number my rows when they get
> sorted in the script.

Store the sorted rows in an array:

  @sorted_rows = sort { ... } @rows;

Then loop over the sorted rows with foreach:

  foreach $i (0 .. $#sorted_rows) {
    print '<tr><td>', $i+1, '</td>';
    ...
    print '</tr>';
  }

-- 
Gareth Rees


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

Date: Sun, 08 Nov 1998 09:24:17 -0700
From: Craig Sprout <csprout@3rivers.net>
Subject: mod_perl question
Message-Id: <3645C5B1.F0440829@3rivers.net>

I hope that this isn't a newbie question, but I am new to perl, and am
having some problems with mod_perl and Apache.

I am using perl 5.004_04, Apache 1.3.3, and these versions of the
following modules:
Apache-SSI 1.98
CGI.pm 2.43
Data-Dumper 2.09
HTML-Parser 2.20
HTML-SimpleParse 0.05
MIME-Base64 2.08
Msql-Mysql-modules 1.2005
libnet 1.0605
libwww-perl 5.36
mod_perl 1.16

I compiled all the perl modules with no problem, using the following
steps:
# perl Makefile.PL
# make
# make test
(if everything worked out OK...)
# make install

I compiled httpd from the mod_perl source tree, and the messages
indicate that mod_perl is in there and working fine.

(from logs/error_log)

[Sun Nov  8 08:49:39 1998] [notice] Apache/1.3.3 (Unix) mod_perl/1.16
configured -- resuming normal operations

The problem occurs when I try to access one of the perl scripts in the
cgi-bin directory.  I get this:

"Can't locate object method "request" via package "Apache" at
/cgi-bin/myscript.pl line 2."

In httpd.conf, I have:

PerlModule      Apache::Registry
<Location /home/httpd/cgi-bin/>
        SetHandler      perl-script
        PerlHandler     Apache::Registry::handler
        PerlSendHeader  On
        Options         ExecCGI
</Location>


In srm.conf, I have:

<Location /home/httpd/cgi-bin/>
Options +ExecCGI +All +Includes
</Location>

Which are redundant.

I've tried the "PerlHandler" directive as "Apache::Registry" and what
you see above.

The first part of the script follows:

#!/usr/bin/perl
my $r = Apache->request;
$r->content_type("text/html");
$r->send_http_header();
 ... 

Any thoughts or ideas?  Thanks in advance for the help.  Feel free to
email me if you need more information.

-Craig


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

Date: Sun, 8 Nov 1998 10:44:38 -0500
From: "Kavian Moradhassel" <kavian@nortel.ca>
Subject: Multi-platform Perl compiles
Message-Id: <724e8p$mtr$1@bmerhc5e.ca.nortel.com>

I'm about to start a multi-platform (HPUX 10.20 and Solaris) compile of Perl
5.005; I've done compiles before, but I've only a multi-platform compile
once before, so I've got a couple of questions:

1) The way I've been doing this is doing the compile as you would normally,
then copying all the executables in $PERLDIR/bin into a directory; this gets
repeated for every platform.  Each of the directories of executables goes
into $PERLDIR/bin, and I write a little wrapper script that selects the
correct one at execution time.  Now, this is the only way I know to do this,
but I wanted to make sure that there wasn't some brilliantly easier way.

2) I'm installing several modules; some are statically compiled, some
dynamically.  My big question is: how do I know which modules need to be
installed while compiling the whole Perl install (and thus, these modules
are compiled and installed for each platform), and which modules I can later
install from one platform and still have it accessible on all platforms?
Logically, the modules that are just Perl code (ie. no C libraries to worry
about like with ARSperl or DB_File) don't need to be installed on every
platform, but how do I know for sure which ones can be installed with which
way?

If anyone has any experience with multi-platform Perl installs (or if you
know of a good web page describing all this), I'd love to hear about it.

Thanks,
Kav Moradhassel
kavian@nortel.ca




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

Date: 9 Nov 1998 14:42:25 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <726v0h$oli$1@info.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 02 Nov 1998 14:35:58 GMT and ending at
09 Nov 1998 08:00: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) 1998 Greg Bacon.  All Rights Reserved.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  246 (48.2% of all posters)
Articles: 358 (27.9% of all articles)
Volume generated: 635.8 kb (28.4% of total volume)
    - headers:    246.2 kb (5,115 lines)
    - bodies:     381.1 kb (12,462 lines)
    - original:   287.2 kb (9,744 lines)
    - signatures: 8.1 kb (229 lines)

Original Content Rating: 0.754

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 184 posters
    s:      1.2 posts
Message size: 1818.5 bytes
    - header:     704.2 bytes (14.3 lines)
    - body:       1090.1 bytes (34.8 lines)
    - original:   821.5 bytes (27.2 lines)
    - signature:  23.2 bytes (0.6 lines)

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

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

    8    10.0 (  6.6/  3.0/  2.1)  tore@forumnett.no
    8    18.5 (  5.7/ 12.8/  7.4)  Ron Parker <sysop@scbbs.com>
    7    11.6 (  5.2/  6.4/  3.6)  "Roger Kenneth Trussell" <rtrussell@hps-inc.com>
    7     6.4 (  4.2/  2.2/  2.2)  "Casema" <ours@casema.net>
    6    10.6 (  4.8/  5.8/  3.5)  "Justin B. Harvey" <jbharvey@corp.home.net>
    6     6.2 (  4.3/  1.9/  1.6)  "Rusty Williamson" <rwilliamson@uno.gers.com>
    5     6.5 (  3.3/  3.2/  1.4)  Steve miles <smiles@wfubmc.edu>
    4     9.8 (  2.7/  6.8/  3.5)  Dan Baker <dtbaker-@busprod.com>
    4     4.1 (  2.5/  1.6/  1.6)  "Billsterz" <bill@sterzenbach.com>
    4     9.6 (  2.1/  7.5/  3.1)  imchat@ionet.net

These posters accounted for 4.6% of all articles.

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

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

  20.9 (  0.5/ 20.4/ 20.4)      1  scottsmi@blue.seas.upenn.edu (Scott Smith)
  18.5 (  5.7/ 12.8/  7.4)      8  Ron Parker <sysop@scbbs.com>
  17.3 (  3.0/ 14.3/  5.7)      4  Chris <chris_N0SPAM@trsilvius-co.com>
  11.8 (  0.6/ 11.1/ 11.1)      1  j.poehlmann@link-n.cl.sub.org
  11.6 (  5.2/  6.4/  3.6)      7  "Roger Kenneth Trussell" <rtrussell@hps-inc.com>
  10.6 (  4.8/  5.8/  3.5)      6  "Justin B. Harvey" <jbharvey@corp.home.net>
  10.0 (  6.6/  3.0/  2.1)      8  tore@forumnett.no
   9.8 (  2.7/  6.8/  3.5)      4  Dan Baker <dtbaker-@busprod.com>
   9.6 (  2.1/  7.5/  3.1)      4  imchat@ionet.net
   9.5 (  1.7/  7.8/  4.4)      2  Navin Chander <navin@ti.com>

These posters accounted for 5.8% 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  "Billsterz" <bill@sterzenbach.com>
1.000  (  2.2 /  2.2)      7  "Casema" <ours@casema.net>
1.000  (  3.1 /  3.1)      3  rsc@snipe.scd.ucar.edu (Robert S. Campbell)
0.817  (  1.6 /  1.9)      6  "Rusty Williamson" <rwilliamson@uno.gers.com>
0.702  (  2.1 /  3.0)      8  tore@forumnett.no
0.657  (  1.7 /  2.5)      3  "Jerome O'Neil" <jeromeo@atrieva.com>
0.599  (  2.1 /  3.5)      3  cyrnos@my-dejanews.com
0.595  (  3.5 /  5.8)      6  "Justin B. Harvey" <jbharvey@corp.home.net>
0.584  (  2.4 /  4.1)      3  Morten Knudsen <mk@control.auc.dk>
0.577  (  7.4 / 12.8)      8  Ron Parker <sysop@scbbs.com>

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

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

0.562  (  2.4 /  4.2)      3  cpierce1@mail.ford.com (Clinton Pierce)
0.562  (  3.6 /  6.4)      7  "Roger Kenneth Trussell" <rtrussell@hps-inc.com>
0.517  (  3.5 /  6.8)      4  Dan Baker <dtbaker-@busprod.com>
0.449  (  1.2 /  2.7)      3  james_peregrino@harvard.edu (James Peregrino)
0.437  (  2.7 /  6.1)      3  "Spider" <arachne@2webspinners.com>
0.432  (  1.4 /  3.2)      5  Steve miles <smiles@wfubmc.edu>
0.413  (  3.1 /  7.5)      4  imchat@ionet.net
0.402  (  0.6 /  1.5)      3  alan@akqa.com
0.396  (  5.7 / 14.3)      4  Chris <chris_N0SPAM@trsilvius-co.com>
0.363  (  0.7 /  1.8)      3  Glauber Ribeiro <glauber@iws-irms.com>

20 posters (8%) had at least three posts.


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

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

      18  Mycroft <drake@nospam.cis.uab.edu>
      18  jrchaff@emeraldnet.net
       6  eric.wai@bcs.org.uk
       3  Ron Parker <sysop@scbbs.com>
       3  jcrouch@MCS.COM (Jude Crouch)
       3  tstyles@my-dejanews.com
       3  mmehta@McLeodUSA.com
       3  matt@ohionet.org
       2  "Jerome O'Neil" <jeromeo@atrieva.com>
       2  gwyn@caerdroia.org (Jeff Medcalf)


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

Date: Mon, 09 Nov 1998 00:52:12 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: newbie question
Message-Id: <Pine.GSO.4.02A.9811081651160.14028-100000@user2.teleport.com>

On 9 Nov 1998, Jang Choe wrote:

> Subject: newbie question

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

> How do I attatch 2 strings together to a variable?

See the dot (.) operator in the perlop manpage. Hope this helps!

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




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

Date: Mon, 09 Nov 1998 13:16:04 GMT
From: grahams@wpds.com
Subject: Re: newbie question
Message-Id: <726puk$3k2$1@nnrp1.dejanews.com>

#!/usr/bin/perl -w

    $foo = "hello " . "world!";
    print "$foo\n";

    # or #
    $foo = "hello ";
    $foo .= "world!";
    print "$foo\n";

    # or #
    $h = "hello";
    $w = "world!";
    printf "%s %s\n", $h, $w;

    # or #
    $h = "hello";
    $w = "world!";
    print "$h $w\n";

   # there's usually more than on way to do it in Perl  In article
<725e5c$286@catapult.gatech.edu>,
  gt6786b@acmey.gatech.edu (Jang Choe) wrote:
>
> How do I attatch 2 strings together to a variable?
> like
>
> $foo = "hello"  +  "world";
>
> which makes $foo = "hello world"
>
> thanks.
>
> --
> That he is mad, 'tis true: 'tis true 'tis pity;
> And pity 'tis 'tis true.  --Shakespeare, Hamlet, II, 2
>
> Quote of the day:  "
>
>

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


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

Date: Mon, 09 Nov 1998 08:59:14 -0500
From: "Garrett G. Hodgson" <garry@sage.att.com>
Subject: Re: Not to start a language war but..
Message-Id: <3646F532.70C3FB6@sage.att.com>

Zenin wrote:

>         And to any 5 day old Perl programmer, an 'eval{block}; if ($@){}'
>         statement is equally as reflective.

nonsense.  i have written and looked at a lot of perl code over
the years, and this discussion is the first time i'd encountered this.

>         If the "Purer OO" languages could agree on any of this (Python has
>         except: while Java has catch, etc) I might give you more points
>         here.  But they don't, so I can't.

the keywords differ, the concepts are the same.

-- 
Garry Hodgson			too much fun...that's news to me
garry@sage.att.com		too much fun...how could it be?
Software Innovation Services	a whole lotta things that
AT&T Labs			   i ain't never done
				i ain't never had too much fun


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

Date: Mon, 09 Nov 1998 09:18:54 -0500
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccj.org>
Subject: Re: Opening files
Message-Id: <3646F9CE.3C1EADAA@fccj.org>

webmaster@man.amis.com wrote:
> 
> What file formats can Perl open and read?

Hmmm, what file formats can you imagine?

Think of data as one long stream, not as one format or another...


HTH,
-Sneex-  :]
______________________________________________________________________
Bill Jones  |  904/632-3089  |  http://www.fccj.org/cgi/mail?webmaster
----------------------------------------------------------------------
(Contrary to the general lack of support within 'Open Source' coding -
 I support what I write...  Others haven't, can't, or won't...)


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

Date: 8 Nov 1998 17:45:34 GMT
From: pete@localhost.localdomain (Peter J. Kernan)
Subject: Re: Perl script on Unix???
Message-Id: <724lbu$fmc$1@pale-rider.INS.CWRU.Edu>

In article <723po3$rjm$1@nnrp1.dejanews.com>,
	ssery@my-dejanews.com writes:
> Hi Everyone...
> 
> I'm trying to make a perl script to display all machine's condition 
> in the
> lab. For example, if I run the script on Unix, it should display...
> yyoon:root> perl ypcat.pl  <- ypcat is a file name 112,223,112,0 
> camp alive
> 112,223,112,1 udhg alive 112,223,112,2 rudead dead  <- if rudead 
> machine is
> dead or not responding ..... ..... 112,223,112,250 lory alive
> 
> I started it out like this.
> #!/usr/bin/perl
> for($i=1;$i<=250;$i++)
> {
>  ypcat hosts | grep 112,223,112,$i;
   ^huh?
>  ping 112,223,112,$i;
   ^huh?

if you want the ping part in perl w/out sh overhead tweak the
following to suit your needs, see perldoc Net::Ping or CPAN

#!/usr/bin/perl -w
#test Net::Ping, usage $0 <host>
use Net::Ping;

$host = shift;
$p = Net::Ping->new();
print "$host is alive.\n" if $p->ping($host);
$p->close();
#####
one way to get the ypcat stuff into your program is
@hosts = (`ypcat hosts` =~ m/112,223,112,\d+/g);

-- 
open SIG, "<$ENV{HOME}/.sig"         or die       "sigless!     $!"; 
$sig = do {local $/; <SIG>};         close SIG && print<<"$sig SIG";
        Pete Kernan  CWRU Physics and Statistics Depts
        http://theory2.phys.cwru.edu/~pete
$sig SIG


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

Date: Mon, 09 Nov 1998 13:56:19 GMT
From: pheon@hevanet.com (Andy Davidson)
Subject: Removing ^K
Message-Id: <3646f2de.83754841@news.hevanet.com>

I am puzzled.  I have a tab-separated file which due to errors in the
originating database has ^K in some fields.  I want to remove these. I
can do this from each field after I have split the record, but not in
the original line.

This does not work:
	$line = $_;
	$line =~ s/\cK//g;  # This doesn't work for some reason
but this does:
	($code, $surname, $firstname, $address, $city, $state, $zip) =
split(/\t/);

	#  Remove all ^K from fields
	foreach $field ($code, $surname, $firstname, $address, $city,
$state, $zip) {
	    $field =~ s/\cK//g;	   
	}

Why?  What am I missing?

	andy



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

Date: Sun, 8 Nov 1998 12:57:38 -0500
From: "Manuel Labor" <mlabor@mexico.com>
Subject: Resouce for PERL script in HTML files
Message-Id: <724m18$qh8$1@fir.prod.itd.earthlink.net>

Im looking for a resource on how to use perlscript in a html file. I don't
want to write a script, save as *.pl and then try to run from the html file.
I want to use <scipt tags>

I can't even find how to assign variables.

I am trying to do this

@file=contents of a webpage;
print @file;

thanks for any help





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

Date: Sun, 8 Nov 1998 13:07:22 -0500
From: "Manuel Labor" <mlabor@mexico.com>
Subject: Resource for activescpiting in perl
Message-Id: <724mjf$rdr$1@fir.prod.itd.earthlink.net>

Im looking for a resource on how to use perlscript in a html file. I don't
want to write a script, save as *.pl and then try to run from the html file.
I want to use <scipt tags>

I can't even find how to assign variables.

I am trying to do this

@file=contents of a webpage;
print @file;

thanks for any help






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

Date: Mon, 09 Nov 1998 12:27:13 GMT
From: angus@od-site.com
Subject: Sending SOLICITED bulk mail.
Message-Id: <726n30$1ge$1@nnrp1.dejanews.com>

Hi,

I have a client who  wants to send a weekly report to between
100 and 1500 clients who _pay_ for the service [ie. its not spam ]

The report is a binary file of about 600-1000K in size.

Short of a foreach ($recp){ open(MAIL | sendmail $recp) etc}
has anyone got a program which does this a little more efficiently without
killing my server !  I can hack perl, but my sendmail knowledge is limited.

Any suggestion appreciated,

Thanks
Angus Bradley

angus@od-site.com






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


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

Date: Mon, 09 Nov 1998 13:56:37 GMT
From: bill_mcintyre@my-dejanews.com
Subject: Re: Shared CGI.pm from various directories
Message-Id: <726sal$5i3$1@nnrp1.dejanews.com>



>
> Good answer: Use 'use lib' properly and you can tell perl where to find
> your module.
>

I would love to 'use lib' properly. What should I read to learn how to do
that. I tried the man pages but I guess I missed something.

> Better answer: Put the CGI module with your other modules, along the
> existing @INC path.
>
I will check with my ISP to see if they will put the module there.

> Best answer: Install 5.004 or later properly, and this problem (and
> others) will go away.
>

I will contact my ISP and ask them to do this. ( Does 5.004 come with CGI.pm?
is this why te newer version would fix this problem? )

> Hope this helps!
>

It has helped a lot as I am learning more and more. I appreciate you taking
the time to help.

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


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

Date: Mon, 09 Nov 1998 14:07:20 GMT
From: bill_mcintyre@my-dejanews.com
Subject: Re: Shared CGI.pm from various directories
Message-Id: <726sup$69l$1@nnrp1.dejanews.com>



> Best answer: Install 5.004 or later properly, and this problem (and
> others) will go away.
>

To get a better feel for this I quickly built a linux box with Apache 3 on it
and installed (properly?) perl 5.00403. All seems to work well but I still
need to have CGI.pm in the same location as the scripts that calls it. What
Bozo thing did I do now?

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


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

Date: Mon, 9 Nov 1998 07:43:12 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: shift in a list context
Message-Id: <ghr627.va5.ln@flash.net>

Awrobinson (awrobinson@aol.com) wrote:

: This response really bothered me. Here's what I think was bad about it:

: 1. Empiricism doesn't always work. 


   But it would work for the question that you asked.


: 2. Your statement about it being quicker to look something up or try it is not
: always true. 


   But it was true for the question that you asked.


: There have been many times when I tried to look something up, but
: didn't know enough to find the info I was looking for. 


   But your post was not one of those times.

   Your code used shift(). Functions are easy to find. They are
   all in the perlfunc man page.


: 3. Your veiled insult about my posting from America Online. 


   AOL has earned the reputation that it has.

   Postings from that domain often ask questions that can easily
   and quickly be answered by consulting the docs or running a
   test program.

   The question that you asked is consistent with that reputation.


: 4. In the time it took you to come up with your snappy response, you could have
: answered my question. 


   Your question was "would I get the first two elements of @_?".

   "Try it and see" would tell you if you would or not, as would
   reading the description of the function that you were using.

   That *is* an answer.


: 5. The fact that you did respond with insulting answers, I can only conclude
                                                                 ^^^^^^^^^^^^^
: that you wanted to show off your superior intelligence. 


   I conclude that he gave two ways to get the answer to your question.
   
   If you don't like the answer, don't respond.


: >From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)

: >> If I coded something like:
: >
: >>   sub mysub {
: >>       ( $first, $second ) = shift;
: >
: >>would I get the first two elements of @_?
: >
: >Empiricism is dead, it seems...
: >
: >Try it and see.  It'll take all of two minutes--much less time than waiting
: >for an answer on Usenet.  Alternately, read the "shift" entry in the
: >perlfunc manual page.  Either way, you'll get a definitive answer.
: >
: >>Disclaimer: The opinions expressed are mine alone and do not represent
: >the
: >>views of America Online
: >
: >...Must...control...gratuitous...AOL...comment...



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


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

Date: Sun, 08 Nov 1998 11:13:24 -0700
From: David Bradley <bradley@frii.com>
Subject: SpecPerl Mirror??
Message-Id: <3645DF44.51A28320@frii.com>

Does anyone know where I can find a copy
of SpecPerl for Windows?  The much referenced
www.keck.ucsf.edu/~kvale site does not seem
to be working.  Thanks

- Dave Bradley



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

Date: 9 Nov 1998 14:43:11 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <726v1v$oli$2@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 02 Nov 1998 14:35:58 GMT and ending at
09 Nov 1998 08:00: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) 1998 Greg Bacon.  All Rights Reserved.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@mox\.perl\.com

Totals
======

Posters:  510
Articles: 1283 (474 with cutlined signatures)
Threads:  427
Volume generated: 2240.4 kb
    - headers:    913.4 kb (18,426 lines)
    - bodies:     1243.1 kb (40,478 lines)
    - original:   836.5 kb (29,342 lines)
    - signatures: 82.7 kb (1,967 lines)

Original Content Rating: 0.673

Averages
========

Posts per poster: 2.5
    median: 1.0 post
    mode:   1 post - 311 posters
    s:      5.5 posts
Posts per thread: 3.0
    median: 2 posts
    mode:   2 posts - 124 threads
    s:      4.3 posts
Message size: 1788.1 bytes
    - header:     729.0 bytes (14.4 lines)
    - body:       992.1 bytes (31.5 lines)
    - original:   667.7 bytes (22.9 lines)
    - signature:  66.0 bytes (1.5 lines)

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

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

   92   129.7 ( 70.4/ 48.3/ 30.8)  Tom Phoenix <rootbeer@teleport.com>
   39    62.8 ( 22.6/ 40.2/ 24.8)  tadmc@flash.net (Tad McClellan)
   30    38.4 ( 24.1/ 14.3/  6.8)  Tk Soh <r28629@email.sps.mot.com>
   25    41.7 ( 19.0/ 16.3/  9.7)  rjk@coos.dartmouth.edu (Ronald J Kimball)
   25    57.1 ( 26.1/ 29.9/ 14.5)  John Porter <jdporter@min.net>
   22    35.3 ( 14.4/ 18.4/ 11.8)  lr@hpl.hp.com (Larry Rosler)
   20    54.6 ( 16.7/ 30.9/ 18.5)  Zenin <zenin@bawdycaste.org>
   16    24.5 (  9.5/ 12.9/  5.6)  bhilton@tsg.adc.com (Brand Hilton)
   16    31.5 ( 12.2/ 14.2/  8.1)  perlguy@technologist.com
   15    25.4 ( 12.1/  9.1/  4.5)  Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>

These posters accounted for 23.4% of all articles.

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

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

 129.7 ( 70.4/ 48.3/ 30.8)     92  Tom Phoenix <rootbeer@teleport.com>
  62.8 ( 22.6/ 40.2/ 24.8)     39  tadmc@flash.net (Tad McClellan)
  57.1 ( 26.1/ 29.9/ 14.5)     25  John Porter <jdporter@min.net>
  54.6 ( 16.7/ 30.9/ 18.5)     20  Zenin <zenin@bawdycaste.org>
  41.7 ( 19.0/ 16.3/  9.7)     25  rjk@coos.dartmouth.edu (Ronald J Kimball)
  38.4 ( 24.1/ 14.3/  6.8)     30  Tk Soh <r28629@email.sps.mot.com>
  35.3 ( 14.4/ 18.4/ 11.8)     22  lr@hpl.hp.com (Larry Rosler)
  34.0 (  3.6/ 30.0/ 29.0)      7  Greg Bacon <gbacon@cs.uah.edu>
  31.5 ( 12.2/ 14.2/  8.1)     16  perlguy@technologist.com
  25.4 ( 12.1/  9.1/  4.5)     15  Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>

These posters accounted for 22.8% of the total volume.

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

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

1.000  (  2.2 /  2.2)      7  "Casema" <ours@casema.net>
1.000  (  3.7 /  3.7)      6  fl_aggie@thepentagon.com (I R A Aggie)
0.968  ( 29.0 / 30.0)      7  Greg Bacon <gbacon@cs.uah.edu>
0.915  (  3.7 /  4.0)      5  Greg Coit <gbc1@axe.humboldt.edu>
0.864  (  9.9 / 11.5)      8  aml@world.std.com (Andrew M. Langmead)
0.817  (  1.6 /  1.9)      6  "Rusty Williamson" <rwilliamson@uno.gers.com>
0.762  (  2.1 /  2.8)      5  "Pap" <Pap22@erols.com>
0.729  (  2.5 /  3.5)      5  bhoylma@uswest.com
0.725  (  4.3 /  5.9)      5  sb@engelschall.com (Steffen Beyer)
0.719  (  2.1 /  2.9)      5  bart.mediamind@ping.be (Bart Lateur)

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

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

0.486  ( 14.5 / 29.9)     25  John Porter <jdporter@min.net>
0.476  (  6.8 / 14.3)     30  Tk Soh <r28629@email.sps.mot.com>
0.471  (  1.8 /  3.9)      6  dragons@scescape.net (Matthew Bafford)
0.465  (  5.1 / 10.9)     14  Uri Guttman <uri@fastengines.com>
0.463  (  2.2 /  4.8)      6  clay@panix.com (clay irving)
0.461  (  3.5 /  7.6)      8  "AmD" <Allan@due.net>
0.438  (  5.6 / 12.9)     16  bhilton@tsg.adc.com (Brand Hilton)
0.432  (  1.4 /  3.2)      5  Steve miles <smiles@wfubmc.edu>
0.418  (  2.8 /  6.7)     12  comdog@computerdog.com (brian d foy)
0.339  (  4.3 / 12.7)     13  jbharvey@auspex.net

51 posters (10%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   68  Not to start a language war but..
   21  perl&cgi question
   14  Pattern matching
   11  reg. expr question.
   11  PERL is TOO flexible
   11  Processing form
   10  Reference Safety
   10  Shared CGI.pm from various directories
    9  FAQ question.
    9  a small question

These threads accounted for 13.6% of all articles.

Top 10 Threads by Volume
========================

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

 182.2 ( 66.1/110.6/ 68.0)     68  Not to start a language war but..
  36.6 ( 17.2/ 18.5/  9.1)     21  perl&cgi question
  23.3 (  7.0/ 15.2/ 10.3)     11  PERL is TOO flexible
  22.9 (  9.2/ 12.1/  8.3)     10  Reference Safety
  22.1 (  3.5/ 18.3/ 18.1)      5  programing fun: tree: Transpose
  20.9 (  0.5/ 20.4/ 20.4)      1  Problems building to load dynamic extensions
  18.4 ( 10.2/  7.2/  3.9)     14  Pattern matching
  18.4 (  2.7/ 15.6/ 14.3)      4  Processing incoming mail messages
  17.9 (  7.9/  8.6/  4.2)     11  Processing form
  17.4 (  6.0/ 10.8/  6.8)      9  Perl Warning Message?

These threads accounted for 17.0% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

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

0.988  ( 18.1/  18.3)      5  programing fun: tree: Transpose
0.818  (  3.8/   4.6)      5  PLEASE HELP!
0.817  (  1.6/   2.0)      5  Sendmail-code needed
0.798  (  6.6/   8.3)      5  Raw socket programming in Perl
0.759  (  6.7/   8.8)      5  BIZARRE -- Perl vs C for Y2K
0.753  (  1.5/   1.9)      5  How do you delete files in a directory?
0.750  (  2.1/   2.8)      7  delete a file under win95 (!)
0.750  (  3.1/   4.2)      5  Denying repeated submissions...
0.745  (  1.6/   2.2)      5  "Account Manager Beta" crack?
0.740  (  3.6/   4.9)      5  opendir() VS glob - WAS Re: readdir bug in win95 perl 5.00402?

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

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

0.516  (  2.3 /  4.4)      7  Decimal to Hex conversion
0.500  (  1.5 /  3.0)      6  Interesting challenge:  Reformatting text to 80 chars.
0.490  (  9.1 / 18.5)     21  perl&cgi question
0.490  (  2.7 /  5.5)      6  HELP! I need a perl enviroment for Win 95
0.486  (  4.2 /  8.6)     11  Processing form
0.483  (  3.3 /  6.8)      7  Array Ref Question
0.454  (  1.9 /  4.1)      6  images in perl
0.437  (  1.5 /  3.4)      5  Tk on NT
0.411  (  3.0 /  7.3)     10  Shared CGI.pm from various directories
0.312  (  1.5 /  4.6)      5  CGI and Server Loads

68 threads (15%) had at least five posts.

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

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

      66  comp.lang.python
      56  comp.lang.perl.modules
      16  comp.lang.perl.moderated
       8  comp.lang.perl
       7  alt.perl
       7  microsoft.public.inetserver.iis
       5  comp.security.unix
       5  comp.lang.perl.tk
       5  comp.infosystems.www.servers.unix
       4  comp.unix.solaris

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

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

      18  jrchaff@emeraldnet.net
      18  Mycroft <drake@nospam.cis.uab.edu>
      15  John Porter <jdporter@min.net>
       9  Zenin <zenin@bawdycaste.org>
       7  keydet89@yahoo.com
       6  eric.wai@bcs.org.uk
       6  sb@engelschall.com (Steffen Beyer)
       5  lr@hpl.hp.com (Larry Rosler)
       4  Tom Phoenix <rootbeer@teleport.com>
       4  tchrist@mox.perl.com (Tom Christiansen)


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

Date: Sun, 08 Nov 1998 10:07:22 -0600
From: Dan Baker <dtbaker-@busprod.com>
Subject: Thanx! Re: opendir() VS glob - WAS Re: readdir bug (not:))
Message-Id: <3645C1BA.B03C294@busprod.com>

Tom Phoenix wrote:
> 
> On Sat, 7 Nov 1998, Dan Baker wrote:
> 
> > why would you choose to use opendir() rather than just glob<>? Are
> > there speed or other advantages/disadvantages?
> 
> opendir() and friends are generally faster, since they don't spawn a
> separate process. They return every item every time, so you need to use
> your own code to take out any items you don't want, such as dotfiles.
> 
> glob() is potentially dangerous, since it can suffer from csh's security
> holes, so it's disallowed on some systems when taint checks are turned on.
> It may fail to return any matches if there are many, since csh is buggy.
> It may return files which don't actually exist. It may have trouble with
> filenames containing unusual characters, depending upon which shells you
> have (or don't have) installed. It works differently on some systems than
> others. It starts a separate process (on most systems). It's faster to
> code, especially if you want only certain files which can be selected with
> a glob. A glob may easily be made to return a full pathname, rather than
> just the basename, which can be useful in many cases (as you found).
> 
> A future version of Perl will improve glob(), calling opendir() internally
> and thereby eliminating most of its inherent problems. Until then, many
> people choose to use a glob only in quick-and-dirty programs, using
> opendir() on anything serious.
> 
> Hope this helps!
> 
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
--------------------------

great info! Thanx for taking the time to explain. I'm sure that lots of
people will benefit from this particular thread... thanx again!

Thanx, Dan

# If you would like to reply-to directly, remove the - from my username
* no spam please... regulated by US Code Title 47, Sec.227(a)(2)(B)  *


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

Date: 9 Nov 1998 10:36:13 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Why doesn't my perl compiler like this expression?
Message-Id: <slrn74dhct.rb1.sholden@pgrad.cs.usyd.edu.au>

On Sun, 08 Nov 1998 22:22:10 -0500, sara starre <nospam.gear4u@hotmail.com>
	wrote:
>if
>   (i)    $a=$b=$c=0;
>and
>  (ii)   $a=$b=$c=1;
>
>are fine, and seem to work correctly, then why does the compiler not
>like:
>
>   (iii)  $a=1+$b=$c=0;

You can't assign to (1+$b) which is obvious enough... Plus binds tighter than
assignment - which is good since otherwise assignment statements would look
very lispy...

You can use : $a=1+($b=$c=0); if that is what you are after but that is
just obfuscation - in my opinion anyway.


-- 
Sam

Just don't create a file called -rf.  :-)
	--Larry Wall


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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