[12227] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5827 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 29 12:07:25 1999

Date: Sat, 29 May 99 09:00:17 -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, 29 May 1999     Volume: 8 Number: 5827

Today's topics:
    Re: Add Unix User function <rootbeer@redcat.com>
    Re: Alternative to deprecated scalar split <rick.delaney@home.com>
    Re: Calling a Perl script (MomLucie)
    Re: form date to text file write <rootbeer@redcat.com>
    Re: Help: About Apache and Perl <gellyfish@gellyfish.com>
    Re: Im not asking for much <tchrist@mox.perl.com>
    Re: Incrementing a value in a slice <gellyfish@gellyfish.com>
    Re: Is 'Global symbol "%s" requires...' Fatal? <rick.delaney@home.com>
        pattern matching <frankhale@yahoo.com>
    Re: Perl scripts won't run on Linux <paladin@uvic.ca>
        Reading Files <frankhale@yahoo.com>
    Re: Reading Files (Hugh Denman)
    Re: Reading Files <rick.delaney@home.com>
        Recursion with filehandle (Hugh Denman)
    Re: Recursion with filehandle <gt7202e@prism.gatech.edu>
    Re: Regexp problem confusing me <yanick@comnet.ca>
    Re: Regexp problem confusing me <rootbeer@redcat.com>
        Using a variable in a hash statement <necro@technologist.com>
    Re: Using a variable in a hash statement <mamster@mamster.net>
    Re: Using a variable in a hash statement <rick.delaney@home.com>
    Re: Using a variable in a hash statement <rick.delaney@home.com>
    Re: Using a variable in a hash statement <mamster@mamster.net>
    Re: Y2K infected Perl code <gellyfish@gellyfish.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 29 May 1999 08:13:03 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Add Unix User function
Message-Id: <Pine.GSO.4.02A.9905290809090.4499-100000@user2.teleport.com>

On Fri, 28 May 1999, Chilly wrote:

> I know I can add a user to the passwd file and have it set the
> password to NULL automatically, but for security purposes, we're going
> to need to set their first password for them (to their ss#). I tried
> using crypt on their number and saving that into the file, but it
> didn't seem to work. Should crypt be working?

Yes. 

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




Oh, are you still here? :-)  If you're not getting crypt to work, perhaps
you could whip up a small example program which shows what's not working
for you. Try to keep it to just three or four lines, so we can see what's
going on. Cheers!

--Tom



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

Date: Sat, 29 May 1999 13:50:43 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Alternative to deprecated scalar split
Message-Id: <374FF065.C8F6026B@home.com>

[posted & mailed]

Jonathan Stowe wrote:
> 
> Why ugly ? Thats the way I figured it after discovering that what I
> thought should work :
> 
>     $num_fields = () = split / /, $foo;
> 
> didnt (Why that gugus ?).

I'm sure you could figure this out yourself by consulting perlfunc but
in short, split knows how many scalars are in the list to be assigned to
and doesn't waste time splitting more than necessary.

This is easy to override:

    $num_fields = () = split ' ', $foo, -1;

but watch out for trailing null fields.

(I changed / / back to ' ' since the original example was with awk-like
split).

perldoc -f split :-)

-- 
Rick Delaney
rick.delaney@home.com


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

Date: 29 May 1999 15:49:15 GMT
From: momlucie@aol.com (MomLucie)
Subject: Re: Calling a Perl script
Message-Id: <19990529114915.12519.00008229@ng-cd1.aol.com>


Actually, we have this Perl script working fine at the command line. We would
like to create a Visual basic interface to it to give more flexibility to the
user.

Thanks


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

Date: Sat, 29 May 1999 08:31:00 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: form date to text file write
Message-Id: <Pine.GSO.4.02A.9905290814170.4499-100000@user2.teleport.com>

On Fri, 28 May 1999, Roy McClean wrote:

> I am having problems having my script write data submitted from a form
> to text file the same way it was written in the form. It won't hold
> spaces, replaces them with black boxes.

What black boxes? Do you mean flight data recorders? :-)

It sounds as if you're talking about processing data that come to your
program through a webserver. If the data aren't in good shape when you get
them, that's a bug in the server, remote browser, connection, or maybe the
remote user. :-)  If the data are fine, but you're not doing the right
thing, that's your bug. Most often, this latter is caused by not using
CGI.pm or another well-debugged module to (pre-)process the data. If
that's not it, cut your program down to the minimum needed to show the
bug. Cheers!

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



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

Date: 29 May 1999 13:31:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help: About Apache and Perl
Message-Id: <7ioq7a$2i5$1@gellyfish.btinternet.com>

[ comp.lang.perl removed as it dont exist, comp.lang.perl.modules
  removed because this hasnt anything to do with modules ]

In comp.lang.perl.misc weixian_shen@my-deja.com wrote:
> Hi,
>   I am writing a Perl CGI that needs to detect if the users has
> clicked the "STOP" button before the CGI finishes.  I thought
> apache server will send the CGI script a SIGINT or something of
> that kind when user press the STOP button, but it didn't work.

It will almost certaily be too late as the client will have closed its
end of the socket but I think that the program will get a SIGPIPE.  
If you are worried about transactions being completed however you might
need to do some checkpointing in your program.

Almost certainly you will want to ask this question in a group such as:

   comp.infosystems.www.authoring.cgi

Where people are more (avowedly) knowledgeable on thes matters.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 29 May 1999 08:06:09 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Im not asking for much
Message-Id: <374ff451@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, fl_aggie@thepentagon.com writes:
:   print "Learning Perl by Randal Schwartz\n";

Excuse me?

--tom
-- 
Someone who truly understands UNIX not only understands why "rm *"    
screws you, but understands why IT HAS TO BE THAT WAY.


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

Date: 29 May 1999 13:49:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Incrementing a value in a slice
Message-Id: <7ior92$2l6$1@gellyfish.btinternet.com>

On 28 May 1999 15:00:34 -0400 Uri Guttman wrote:
> 
> why can't newbies use hash slices in their hello world programs? :-)
> 

What you mean like :

#!/usr/bin/perl -w

use strict;

my @hello = qw(hello world);
my %blah;

@blah{@hello} = (1,2);

print join ',',  map {ucfirst($_)}
                 sort { $blah{$a} <=> $blah{$b} }
                 keys %blah;

;-}

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 29 May 1999 15:50:55 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Is 'Global symbol "%s" requires...' Fatal?
Message-Id: <37500C92.9D56132D@home.com>

[posted & mailed]

Makoto Ohnuki wrote:
> 
> Why I cannot catch this error at eval-1?

You can catch it (see below), but not in $@ since for some reason it is
a warning.

> Otherwise, Why foo() is not created?
> 
> == evtest.pl ==
> #!/usr/bin/perl -w
> 
> my $src = <<'EOF';
> package Runtime;
> use strict qw(vars subs refs);
> sub foo {
>     return $no_var;
> }
> EOF
> 
> eval $src;  # eval-1
> if ($@) {
>     die "die1:$@";
> }

{
    local @@;
    local $SIG{__WARN__} = sub { push @@, $_[0] };
    eval $src;  # eval-1

    if ($@ || @@) {
        die "die1:\n", @@, $@;
    }
}

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 29 May 1999 11:23:12 -0400
From: Frank Hale <frankhale@yahoo.com>
Subject: pattern matching
Message-Id: <37500660.531E0799@yahoo.com>

How can I match newlines in patterns?

for example:

if ($token =~ /template{(\d\D)}/) {
	print $token."\n";
}

The pattern I am matching can have newlines in it but I can't seem to
match newlines in the pattern. How do you match newlines in patterns?

-- 
From:      Frank Hale
Email:     frankhale@yahoo.com


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

Date: Fri, 28 May 1999 23:59:10 -0700
From: Draco Paladin <paladin@uvic.ca>
To: jmoram@my-deja.com
Subject: Re: Perl scripts won't run on Linux
Message-Id: <Pine.A41.4.05.9905282356320.21048-100000@unix4.UVic.CA>

On Sat, 29 May 1999 jmoram@my-deja.com wrote:

[posted and cc]

> I've just set up at a Linux box as an intranet server. Perl seems to be
> installed ok, but I can't seem to run scripts. The GNU C compiler is
> installed and I've made sure the scripts are executable, but when I give
> the command to run them, I get this message:
> $ bash: command not found <scriptname>
> 
> Is there a config file I need to modify? Any suggestions would be
> appreciated. Thanks in advance.

Make sure that the directory that the script is in is in the path (or give
an explicit path in the invokation).

-- 
Mother is the name for GOD on the lips and
hearts of all children.  - Eric Draven



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

Date: Sat, 29 May 1999 11:03:15 -0400
From: Frank Hale <frankhale@yahoo.com>
Subject: Reading Files
Message-Id: <375001B3.2FBAF8DD@yahoo.com>

I would like to read a file into an array and split it on a semi-colon. 

open (FILE, "<".$commandlineparms[0]) or die "open failed: $!";

while(<FILE>) 
{
	s/#.*//g;     # Strip out comments 
	s/^\s+//g;    # Strip trailing whitespace
	s/\t//g;      # Strip tabs
	s/\n//g;      # Strip newlines
		
	@temp = split (/;/,$_);
		
	push(@infile, @temp);
}
	
This doesn't seem to do it. It just reads in each line and puts it in
the array. I want it to read until it finds a semi-colon and then put it
into the array.

-- 
From:      Frank Hale
Email:     frankhale@yahoo.com


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

Date: Sat, 29 May 1999 15:00:12 GMT
From: hd213@nospam.cam.ac.uk (Hugh Denman)
Subject: Re: Reading Files
Message-Id: <3753fff4.95540379@nntp-serv.cam.ac.uk>

<FILE> reads in one record at a time; by default the record separator
is the newline, which is why you're getting one line at a time. Set
the record separator to ';', by 

$/ = ";"

at the start of your program. It looks like you're using English, in
which case

$INPUT_RECORD_SEPARATOR = ";"
$RS or ";"

this is in the perlvar manpage.

If you do it this way, you don't need to call split. If you want to
use split, you don't need a loop; just go 

undef $/;	#no separator; read whole file
$_ = <FILE>;
@temp = split (/;/,$_);


On Sat, 29 May 1999 11:03:15 -0400, Frank Hale <frankhale@yahoo.com>
wrote:

>I would like to read a file into an array and split it on a semi-colon. 
>
>open (FILE, "<".$commandlineparms[0]) or die "open failed: $!";
>
>while(<FILE>) 
>{
>	s/#.*//g;     # Strip out comments 
>	s/^\s+//g;    # Strip trailing whitespace
>	s/\t//g;      # Strip tabs
>	s/\n//g;      # Strip newlines
>		
>	@temp = split (/;/,$_);
>		
>	push(@infile, @temp);
>}
>	
>This doesn't seem to do it. It just reads in each line and puts it in
>the array. I want it to read until it finds a semi-colon and then put it
>into the array.

Hugh Denman: http://www.chu.cam.ac.uk/home/hd213

Remove 'nospam.' from email address...


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

Date: Sat, 29 May 1999 15:02:46 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Reading Files
Message-Id: <37500149.AF460398@home.com>

[posted & mailed]

Frank Hale wrote:
> 
> I want it to read until it finds a semi-colon and then put it into the 
> array.

Check out $/ ($INPUT_RECORD_SEPARATOR) in perlvar.

$/ = ';';
while(<>) {
    # munging
    push @your_array, $_;
}

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 29 May 1999 13:59:26 GMT
From: hd213@nospam.cam.ac.uk (Hugh Denman)
Subject: Recursion with filehandle
Message-Id: <3752ef6e.91310727@nntp-serv.cam.ac.uk>

Hi,

I'm trying to write a script to remove brackets from all filenames in
a directory tree. The script below only recurses the first directory
entry, even though the @dirs array does contain all the
subdirectories. Can anyone help please?

sub fixdir
{
   my @entries,@files,@dirs;
   my $dirname=shift; 
   if (opendir(DIR, $dirname))
   {
      @entries = readdir(DIR);
      @files = grep {!/^\./ && -f $dirname."\\"."$_"} @entries;
      @dirs = grep {!/^\./ && -d $dirname."\\"."$_"} @entries;
      foreach my $file (@files)
      {
         $file=$dirname."\\".$file;
         $newname=$file; $newname =~ s/\(//g; $newname =~ s/\)//g;
         if ($newname ne $file) {rename $file,$newname;}
      }
      print @dirs;
      foreach my $dir (@dirs)
      {
         $dir=$dirname."\\".$dir; print $dir,"\n";
         &fixdir ($dir);
      }
   }
   else {print "couldn't open dir :( \n";}
}

&fixdir (".");
Hugh Denman: http://www.chu.cam.ac.uk/home/hd213

Remove 'nospam.' from email address...


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

Date: Sat, 29 May 1999 11:44:05 -0400
From: andy barfoot <gt7202e@prism.gatech.edu>
Subject: Re: Recursion with filehandle
Message-Id: <37500B44.90AC3E12@prism.gatech.edu>

Hugh Denman wrote:

> Hi,
>
> I'm trying to write a script to remove brackets from all filenames in
> a directory tree. The script below only recurses the first directory
> entry, even though the @dirs array does contain all the
> subdirectories. Can anyone help please?
>

I changed "\\" to "/" throughout your script and it worked!

Few tips:

    use my (@entries,@files,@dirs);  instead of my @entries,@files,@dirs;

    use #!/../perl -w
    use use strict;
    you could say
        foreach (readdir DIR) {
            $_ = "$dirname/$_";
            if (-f) {
            ...
            }
            elsif (-d _) {
            ...
            }
        }



--
 andy barfoot




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

Date: Sat, 29 May 1999 11:11:14 -0300
From: Yanick Champoux <yanick@comnet.ca>
To: Jed Parsons <jed@socrates.berkeley.edu>
Subject: Re: Regexp problem confusing me
Message-Id: <374FF582.72C9F8E1@comnet.ca>

Hullo,

Jed Parsons wrote:
[...]
>  do {
>         ($prematch, undef) = $t -> waitfor ('/===/');
>         foreach $line (split "\n", $prematch) {
>                 print $line."\n" if $line =~ /^\d/;
>         }
>  } while ($prematch =~ /CONTINUED/);
> 
> If I get rid of the ^ in the re, however, I do get every line with a
> digit in it.  Can someone explain to me what's going on here?

I'm not 100%, but I would bet that it's invisible characters that are
wreaking havoc with your script. Save the output in a file and open it
with vi. You should see some '^M' or the like at the beginning of each
line. Since it's invisible characters, you don't see them, but they are
characters nonetheless and count when you use /^\d/.

Joy,
Yanick

-- 
#!/usr/local/bin/perl
        $Yanick{  Email     } = 'yanick@comnet.ca';
        $Yanick{ 'Web Site' } = 'http://www.iro.umontreal.ca/~champoux';

$_="Yanick"; s!(Y)(an)(i)(ck)!spylqg$2othyqm$3ntrepidqf$1etqwha$4y.
!; s,y,er,g; $_ = join 'q', sort split 'q'; y:fgmqsw: :; print


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

Date: Sat, 29 May 1999 08:48:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Regexp problem confusing me
Message-Id: <Pine.GSO.4.02A.9905290838140.4499-100000@user2.teleport.com>

On 29 May 1999, Jed Parsons wrote:

> Say that $prematch returns lots of lines starting with digits (inventory
> records).  For some reason, the following code gets nothing:
> 
>  do {
> 	($prematch, undef) = $t -> waitfor ('/===/');
> 	foreach $line (split "\n", $prematch) {
> 		print $line."\n" if $line =~ /^\d/;
> 	}
>  } while ($prematch =~ /CONTINUED/);
> 
> If I get rid of the ^ in the re, however, I do get every line with a
> digit in it.  Can someone explain to me what's going on here?

It sounds as if the digits aren't really at the start of the line. My
guess is that there's some control character in there. Could your data be
coming from (or through) some machine that's using two characters to
denote end-of-line, and you're not changing that to a single newline
character? 

You may simply want to use /^\s*\d/ to mean "starting with digits". Hope
this helps!

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



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

Date: Sat, 29 May 1999 23:42:46 +1000
From: "Alex Holliday" <necro@technologist.com>
Subject: Using a variable in a hash statement
Message-Id: <t8S33.1522$ZI1.7330@ozemail.com.au>

In the below code I want to use the number input to $favourite as the
reference for the hash statement. The last line is the problem. I have tried
using single and double quotes surrounding $favourite, no quotes at all, and
just favourite between the curly braces, and no braces at all. If I put a 1,
2, etc between the braces it works. But that number changes, which is why I
want to use $favourite. Can you use variables for hashes? If so, how?
Thanks.

print "\nColours:\n";
$number = 0;
@colours = ('Red', 'Blue', 'Green', 'Yellow');
foreach $colour_loop (@colours)
    {
    $number++;
    print $number, ": ";
    print $colour_loop, "\n";
    }
print "Enter the number of your favourite colour: ";
$favourite = <STDIN>;
%h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
print "Your favourite colour is ", $h{"$favourite"};




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

Date: Sat, 29 May 1999 10:06:23 -0400
From: Matthew Amster-Burton <mamster@mamster.net>
Subject: Re: Using a variable in a hash statement
Message-Id: <Pine.GSO.3.96.990529100213.1660A-100000@wired.your-site.com>

On Sat, 29 May 1999, Alex Holliday wrote:

> Can you use variables for hashes? If so, how?

> print "\nColours:\n";
> $number = 0;
> @colours = ('Red', 'Blue', 'Green', 'Yellow');
> foreach $colour_loop (@colours)
>     {
>     $number++;
>     print $number, ": ";
>     print $colour_loop, "\n";
>     }
> print "Enter the number of your favourite colour: ";
> $favourite = <STDIN>;
> %h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
> print "Your favourite colour is ", $h{"$favourite"};

Nix the quotes and perldoc -f chomp.

There's also no need to make an array and then a hash to hold the same
data.  Rewrite your loop something like this:

%h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
while( my( $num, $color ) = each %h ) {
   print "$num  $color\n";
}

Best of luck,
Matthew



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

Date: Sat, 29 May 1999 14:19:30 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Using a variable in a hash statement
Message-Id: <374FF71B.D98AB7F7@home.com>

[posted & mailed]

Alex Holliday wrote:
> 
> I have tried using single and double quotes surrounding $favourite, no 
> quotes at all, and just favourite between the curly braces, and no 
> braces at all.

Your problem is not the quoting, although you don't need any. 
$hash{$key} will suffice.

> print "Enter the number of your favourite colour: ";
> $favourite = <STDIN>;

Since my favourite colour is green, I will enter a 3.

Now $favourite eq "3\n";

There is no such key in %h.  You need to get rid of the trailing
newline.

    chomp $favourite;

is one way to do it, but since I'm a sloppy typist I might have entered
" 3\n".  After chomping the newline you're left with ' 3' which is still
not a key in %h.  Since I'm being asked to enter a number, you could
forget the chomp and do

    $favourite += 0;

Now $favourite eq '3' and will result in 

    Your favourite colour is Green

perldoc perldata

A quick way to check that the value of your variable is what you think
it is is to print it out with some visible delimiters:

    print "($favourite)\n";

That would have printed

(3
)

and shown you where your problem was.

> %h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
> print "Your favourite colour is ", $h{"$favourite"};

Since you're using small numbers as indices, perhaps you'd be better off
using an array.

@a = qw/Red Blue Green Yellow/;

Then I'd enter 2 for green and you could just use

    print "Your favourite colour is $a[$favourite]\n";

without any modification to $favourite.  But you should really validate
the input to make sure people enter a number.

perldoc perlfaq4

How do I determine whether a scalar is a number/whole/integer/float? 

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 29 May 1999 14:28:36 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Using a variable in a hash statement
Message-Id: <374FF946.BDB94D04@home.com>

[posted & mailed]

Matthew Amster-Burton wrote:
> 
> There's also no need to make an array and then a hash to hold the same
> data.  Rewrite your loop something like this:
> 
> %h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
> while( my( $num, $color ) = each %h ) {
>    print "$num  $color\n";
> }

There is no guarantee that this will come out in numeric order.

perldoc -f each

If you want it sorted by keys then sort the keys.

    for my $num (sort {$a <=> $b} keys %h) {
        print "$num  $h{$num}\n";
    }

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 29 May 1999 10:24:11 -0400
From: Matthew Amster-Burton <mamster@mamster.net>
Subject: Re: Using a variable in a hash statement
Message-Id: <Pine.GSO.3.96.990529102311.1660C-100000@wired.your-site.com>

On Sat, 29 May 1999, Rick Delaney wrote:

> > %h = ('1', 'Red', '2', "Blue", '3', 'Green', '4', 'Yellow');
> > while( my( $num, $color ) = each %h ) {
> >    print "$num  $color\n";
> > }
> 
> There is no guarantee that this will come out in numeric order.

Eep.  I knew this, but my brain completely failed to operate according to
instructions.

I was right about the chomp, though, wasn't I?

Matthew



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

Date: 29 May 1999 13:18:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Y2K infected Perl code
Message-Id: <7iopen$2i2$1@gellyfish.btinternet.com>

In comp.lang.perl.misc Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> [A complimentary Cc of this posting was sent to Larry Rosler
> <lr@hpl.hp.com>],
> who wrote in article <MPG.11b8a67be8966326989b27@nntp.hpl.hp.com>:
>> > In your infinite wisdom you may be interested to know that 5.00558 may
>> > contain code not *that* dissimilar to the above suggestion.
>> 
>> As history has shown you to be incapable of humor, Ilya,
> 
> Sorry to see you in the camp of the people who need smilies to
> recognize humourous posts.
> 
>> I must take you seriously.
> 
>> I thought that DWIMming was based on syntactic analysis.  Applying it to 
>> the contents of string literals takes it to new heights (depths?).
>> 
>>    s?printf '...19%d...', ..., $year, ...;
>> 
>> will be next, I presume?
> 
> This is not "next".  This is exactly what the next version of Perl may
> detect (given that $year comes from localtime()).
> 

Awesome.  Does this mean that perl will keep track of the source of the
value of each variable in order to prevent possible mis-use of that value?

Unless I miss something that means that the concept of variable will be
expanded to keep track of whatever the RHS of an assigment was.  But
how can that work to include any lvalue such as substr() ?  Or have I
just been negligent in not reading p5p ?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

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

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