[29789] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1032 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 14 11:10:11 2007

Date: Wed, 14 Nov 2007 08:09:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 14 Nov 2007     Volume: 11 Number: 1032

Today's topics:
        Command Line Arguments from a File <g4173c@motorola.com>
    Re: Command Line Arguments from a File <ben@morrow.me.uk>
    Re: cookie dbi based authentication <jcharth@gmail.com>
        how to check whether the field is filled or empty in pe <hara.acharya@gmail.com>
    Re: Mtime <abigail@abigail.be>
    Re: Mtime <wyzelli@yahoo.com.au>
    Re: Mtime <glennj@ncf.ca>
    Re: Mtime <ben@morrow.me.uk>
        MySQL & Perl: Using a Dynamic SELECT Statement <jwcarlton@gmail.com>
    Re: MySQL & Perl: Using a Dynamic SELECT Statement <mritty@gmail.com>
    Re: OS X, installing modules from CPAN <justin.0711@purestblue.com>
    Re: peculiar behaviour with prototyped routines  sheinrich@my-deja.com
        Trap memory overflow <alexxx.magni@gmail.com>
    Re: Trap memory overflow <ben@morrow.me.uk>
    Re: Trap memory overflow <rvtol+news@isolution.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 14 Nov 2007 05:32:55 -0800
From:  T <g4173c@motorola.com>
Subject: Command Line Arguments from a File
Message-Id: <1195047175.338843.3170@d55g2000hsg.googlegroups.com>

Greetings:

     I've gotten a request to put command line arguments into a file.
This file contains other information for building parts. I thought
this would be fairly easy because I've been using Getopt::Long for a
while and thought I would just have to push the switches onto @ARGV
and call Getopt::Long a second time. The code:

            elsif (/^-\w+/) {
                push(@ARGV," $_");
            }
            &Command_Line;# Calls Getopt::Long

I noticed that I have to put a space in the " $_" or else the "-" gets
striped off. None of the options are being set this way. Any ideas
what I'm doing wrong here? Is there a better way to handle this?
Thanks in advanced for any help!

  Tom



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

Date: Wed, 14 Nov 2007 14:40:36 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Command Line Arguments from a File
Message-Id: <40er05-df1.ln1@osiris.mauzo.dyndns.org>


Quoth T <g4173c@motorola.com>:
> 
>      I've gotten a request to put command line arguments into a file.

You haven't said how these arguments are stored in the file, or how you
get them out again.

> This file contains other information for building parts. I thought
> this would be fairly easy because I've been using Getopt::Long for a
> while and thought I would just have to push the switches onto @ARGV
> and call Getopt::Long a second time. The code:
> 
>             elsif (/^-\w+/) {

Where is the rest of this 'if'? What is $_ set to?

You are supposed to post an example we can actually run.

>                 push(@ARGV," $_");
>             }
>             &Command_Line;# Calls Getopt::Long

Don't call subs with & unless you know what it does.

> I noticed that I have to put a space in the " $_" or else the "-" gets
> striped off.

I don't believe you. What made you think that?

> None of the options are being set this way.

Well... no. Getopt::Long looks for arguments starting with '-'; an
argument starting with ' -' doesn't qualify.

> Is there a better way to handle this?

RTFM. Use Getopt::Long::GetOptionsFromString or ::GetOptionsFromArray,
which are provided for this purpose.

Ben



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

Date: Wed, 14 Nov 2007 06:55:56 -0800
From:  joe <jcharth@gmail.com>
Subject: Re: cookie dbi based authentication
Message-Id: <1195052156.174312.144760@o80g2000hse.googlegroups.com>

Thanks Guys, I thought it could be a little bet of topic but I tried
because I thought if someone would know would be this group.

On Nov 9, 12:19 pm, xhos...@gmail.com wrote:
> joe <jcha...@gmail.com> wrote:
> > Hello I am currently using dbi authentication on my apache server to
> > query a table in my sql server for user/password information.
>
> Of "dbi authorization" is a description of something in the Apache server,
> then this is the wrong group to take it to.  While Apache and Perl are
> sometimes used together, they are not particularly related.  On the other

> hand, if "dbi authorization" is a description of something in Perl, than it
> is too vague. That search string brings up several different modules in
> CPAN. What specific module or specific code are you using?
>
> > Is there
> > a way to convert this authentication to cookie based authentication or
> > change the look and feel of the username/password window? thanks.
>
> Cookies are a mechanism for communicating between server and the
> client/browser.  DBI is a way to communicate between a server and itself
> (or an affiliated other server)  I don't see how these things could be
> interchangeable.
>
> Xho
>
> --
> --------------------http://NewsReader.Com/--------------------
> The costs of publication of this article were defrayed in part by the
> payment of page charges. This article must therefore be hereby marked
> advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
> this fact.




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

Date: 14 Nov 2007 06:40:28 -0800
From: king <hara.acharya@gmail.com>
Subject: how to check whether the field is filled or empty in perl TK
Message-Id: <1195050096.604403.314370@k35g2000prh.googlegroups.com>

I have  a perl TK UI. Where the user will feed the Register value.

######################################################################
our $t2=$left1->Label(-text=>'Register',-background=>'cyan')->pack();

our $pre1=$left2->Label(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->Entry()-> pack();
our $ent1=$left2->Entry(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->pack();

$Register_1=$ent1->get();
####################################################################

I want to check whether the user has feeded the register value or kept
it null.

so if i am doing a check like

if (defined $Register_1) { do this}
else { do this}

but its not working. How can i check whether the user has given some
value in the register block or not.



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

Date: 14 Nov 2007 11:28:35 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Mtime
Message-Id: <slrnfjlmv3.qnk.abigail@alexandra.abigail.be>

                                              _
Steven M. O'Neill (steveo@panix.com) wrote on VCLXXXVII September
MCMXCIII in <URL:news:fhd74l$lls$1@reader1.panix.com>:
%%  Abigail  <abigail@abigail.be> wrote:
%% >                                      _
%% >M (no@spam.tonsjunkmail.com) wrote on VCLXXXVII September MCMXCIII in
%% ><URL:news:13jk6m2gka8l223@corp.supernews.com>:
%% >||  Is there an easy way to get perl to return the mtime of the oldest file in a
%% >||  directory?
%% >
%% >
%% >No.
%% >
%% >Reason #1 is that "oldest file" isn't clearly defined. Reason #2 is that
%% >for some definitions of "oldest", including the very obvious one, you need
%% >a piece of information that many filesystems don't keep track of.
%% >
%% >None of these reasons have anything to do with the language you try to
%% >solve the problem with.
%%  
%%  http://groups.google.com/group/comp.unix.shell/msg/777922ad16818eec?dmode=source&hl=en
%%  


I saved the program Tom wrote, and saved it in "/tmp/tom".
Then I ran the following program:

    #!/usr/bin/perl

    use strict;
    use warnings;
    no warnings 'syntax';

    my $DIR = "/tmp/test";
    die "$DIR already exists\n" if -f $DIR;
    mkdir $DIR, 0755 or die "mkdir: $!";
    open my $fh1 => ">", "$DIR/oldest" or die "open: $!";
    print $fh1 "Hello\n";
    close $fh1 or die "close $!";
    sleep 10;
    open my $fh2 => ">", "$DIR/newest" or die "open: $!";
    print $fh2 "Hello\n";
    close $fh2 or die "close $!";
    sleep 10;
    open my $fh3 => ">>", "$DIR/oldest" or die "open: $!";
    print $fh3 "world\n";
    close $fh3 or die "close: $!";

    system perl => "/tmp/tom", $DIR;

    system rm => '-r', $DIR;

    __END__


Its output:

  oldest file in /tmp/test is /tmp/test/newest, time is Wed Nov 14 12:22:53 2007


Hmmm, /tmp/test/oldest was created before /tmp/test/newest, so, arguebly,
it's the oldest file in the directory.
But Tom's program didn't return it's mtime; it returned the mtime of the
newest file.


Getting the mtime of a file is easy. Getting the mtimes of all the files
in a directory is easy as well, and selecting the oldest mtime from the
set is trivial as well.


But what is the "oldest" file? The first one created? The last one modified?
The first entry in the directory? Determining what "oldest" stands for,
that's the hard part of the original question.



Abigail
-- 
use   lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";


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

Date: Wed, 14 Nov 2007 13:14:56 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com.au>
Subject: Re: Mtime
Message-Id: <kxC_i.12536$CN4.7478@news-server.bigpond.net.au>

"Steven M. O'Neill" <steveo@panix.com> wrote in message 
news:fhd74l$lls$1@reader1.panix.com...
> Abigail  <abigail@abigail.be> wrote:
>>                                      _
>>M (no@spam.tonsjunkmail.com) wrote on VCLXXXVII September MCMXCIII in
>><URL:news:13jk6m2gka8l223@corp.supernews.com>:
>>||  Is there an easy way to get perl to return the mtime of the oldest 
>>file in a
>>||  directory?
>>
>>
>>No.
>>
>>Reason #1 is that "oldest file" isn't clearly defined. Reason #2 is that
>>for some definitions of "oldest", including the very obvious one, you need
>>a piece of information that many filesystems don't keep track of.
>>
>>None of these reasons have anything to do with the language you try to
>>solve the problem with.
>
> http://groups.google.com/group/comp.unix.shell/msg/777922ad16818eec?dmode=source&hl=en


Wow, thats what? 14 years ago?

Abigail's comments, albeit crytic are correct.  Which definition of oldest 
do you require?  Least recently modified? Least recently accessed? First 
created?

Once you answer that, the rest is trivial with 'stat' and 'readdir'...

P 




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

Date: 14 Nov 2007 14:15:03 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: Mtime
Message-Id: <slrnfjm0n7.qkn.glennj@smeagol.ncf.ca>

At 2007-11-13 04:44PM, "M" wrote:
>  Is there an easy way to get perl to return the mtime of the oldest file in a 
>  directory?

    opendir my $dir, '.' or die "...";
    my @files = readdir $dir;
    closedir $dir;
    my @with_mtime = map {[$_, (stat $_)[9]]} @files;
    my @sorted = sort {$a->[1] <=> $b->[1]} @with_mtime;
    my $oldest = $sorted[0][0];

You can avoid all the temp vars:

    opendir my $dir, "." or die "...";
    my $oldest = [ sort {$a->[1] <=> $b->[1]} 
                   map {[$_, (stat $_)[9]]} 
                   readdir $dir
                 ]->[0][0];
    closedir $dir;
    
-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry


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

Date: Wed, 14 Nov 2007 14:32:58 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Mtime
Message-Id: <qhdr05-df1.ln1@osiris.mauzo.dyndns.org>


Quoth "Peter Wyzl" <wyzelli@yahoo.com.au>:
> "Steven M. O'Neill" <steveo@panix.com> wrote in message 
> news:fhd74l$lls$1@reader1.panix.com...
> > Abigail  <abigail@abigail.be> wrote:
> >>
> >>Reason #1 is that "oldest file" isn't clearly defined. Reason #2 is that
> >>for some definitions of "oldest", including the very obvious one, you need
> >>a piece of information that many filesystems don't keep track of.
<snip>
> 
> Abigail's comments, albeit crytic are correct.  Which definition of oldest 
> do you require?  Least recently modified? Least recently accessed? First 
> created?
> 
> Once you answer that, the rest is trivial with 'stat' and 'readdir'...

Part of Abigail's point was that 'first created' is impossible to
determine on many filesystems, as creation time is not recorded. Even
when it is, Perl may not provide easy access to that information (BSD's
'birthtime', for instance).

Ben



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

Date: Wed, 14 Nov 2007 01:47:36 -0800
From:  Jason Carlton <jwcarlton@gmail.com>
Subject: MySQL & Perl: Using a Dynamic SELECT Statement
Message-Id: <1195033656.869242.278420@57g2000hsv.googlegroups.com>

I'm trying to set up a dynamic SELECT statement, but it's not doing
what I'm expecting. Is it not possible to make a dynamic SELECT
statement, or am I simply doing it wrong?

# FIRST ATTEMPT:
if ($check_username) {
  if ($type eq "loose") {
    $whereby1 = "WHERE username LIKE CONCAT('%',?,'%')";
  }

  else {
    $whereby1 = "WHERE username=?";
  }

  my $sth = $dbh->prepare("SELECT id FROM posts " . $whereby1);
  $sth->execute($search);

  while (my ($this_id) = $sth->fetchrow_arrayref()) {
    if (!(exists($topics{$this_id}))) { $topics{$this_id} = 1; }
  }
}


This attempt is giving me the complete database, as if $whereby1
doesn't exist. I've checked to make sure that it does, so the SELECT
statement simply isn't allowing the dynamic WHERE operator. Which
really does not work well for me, because I have 3 other IF...ELSE
statements that I would like to use to extend that $whereby1; meaning
that, depending on the options selected, the end value might be:

$whereby1 = "WHERE username LIKE CONCAT('%',?,'%') OR subject LIKE
CONCAT('%',?,'%') OR comment REGEXP ? OR... (and so on)";

But since this isn't working, I thought that I would just remove the
$whereby1 variable altogether, and loop through $sth for every option,
even though this would add a LOT more overhead.


# SECOND ATTEMPT:
if ($check_username) {
  if ($type eq "loose") {
    my $sth = $dbh->prepare("SELECT id FROM posts WHERE username LIKE
CONCAT('%',?,'%')");
    $sth->execute($search);
  }

  else {
    my $sth = $dbh->prepare("SELECT id FROM posts WHERE username=?");
    $sth->execute($search);
  }

  while (my ($this_id) = $sth->fetchrow_arrayref()) {
    if (!(exists($topics{$this_id}))) { $topics{$this_id} = 1; }
  }
}

This attempt gives me the error "Can't call method "fetchrow_arrayref"
on an undefined value", as if $sth hasn't been defined.


If I make the same statement without the IF...ELSE, it works like I
expected, so the problem is definitely with the dynamics:

my $sth = $dbh->prepare("SELECT id FROM posts WHERE username LIKE
CONCAT('%',?,'%')");
$sth->execute($search);

while (my ($this_id) = $sth->fetchrow_arrayref()) {
  if (!(exists($topics{$this_id}))) { $topics{$this_id} = 1; }
}



TIA,

Jason



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

Date: Wed, 14 Nov 2007 06:04:32 -0800
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: MySQL & Perl: Using a Dynamic SELECT Statement
Message-Id: <1195049072.707107.260570@o80g2000hse.googlegroups.com>

On Nov 14, 4:47 am, Jason Carlton <jwcarl...@gmail.com> wrote:
> I'm trying to set up a dynamic SELECT statement, but it's not doing
> what I'm expecting. Is it not possible to make a dynamic SELECT
> statement, or am I simply doing it wrong?
>
> # FIRST ATTEMPT:
> if ($check_username) {
>   if ($type eq "loose") {
>     $whereby1 = "WHERE username LIKE CONCAT('%',?,'%')";
>   }
>   else {
>     $whereby1 = "WHERE username=?";
>   }
>   my $sth = $dbh->prepare("SELECT id FROM posts " . $whereby1);
>   $sth->execute($search);

You're using variables without showing us what they contain.  What's
in $search?  The fact that you haven't shown it suggests you consider
it irrlevant, but since you don't know what's going wrong, you
shouldn't make that assumption.

>   while (my ($this_id) = $sth->fetchrow_arrayref()) {
>     if (!(exists($topics{$this_id}))) { $topics{$this_id} = 1; }
>   }
> }
>
> This attempt is giving me the complete database, as if $whereby1
> doesn't exist. I've checked to make sure that it does

You've checked how?  What debugging statement did you use?  Did you
print the value of $sth->{Statement} to see what SQL is actually being
sent to the database handle?

> , so the SELECT statement simply isn't allowing the dynamic WHERE
> operator.

This makes no sense.  The SELECT statement is a string.  Nothing
more.  It does not "allow" or prevent anything.

> But since this isn't working, I thought that I would just remove
> the $whereby1 variable altogether, and loop through $sth for every
> option, even though this would add a LOT more overhead.
>
> # SECOND ATTEMPT:
> if ($check_username) {
>   if ($type eq "loose") {
>     my $sth = $dbh->prepare("SELECT id FROM posts WHERE username
>     LIKE CONCAT('%',?,'%')");

You are declaring $sth here.

>     $sth->execute($search);
>   }

And the block in which you declared it ends here.  At this point, $sth
ceases to exist.

>   else {
>     my $sth = $dbh->prepare("SELECT id FROM posts WHERE
>     username=?");

Now you've declared a second $sth.
>     $sth->execute($search);
>   }

And here the block in which you declared this second $sth ends.  At
this point, the second $sth also ceases to exist.

>   while (my ($this_id) = $sth->fetchrow_arrayref()) {

Now you are attempting to use a variable that doesn't exist.

>     if (!(exists($topics{$this_id}))) { $topics{$this_id} = 1; }
>   }
>
> }
>

> This attempt gives me the error "Can't call method "fetchrow_arrayref"
> on an undefined value", as if $sth hasn't been defined.

This tells me that you're not using strict.  Why?  It prevents you
from making mistakes like this.  It's also rude to ask us for help
before you ask the computer for help.

Paul Lalli



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

Date: Wed, 14 Nov 2007 14:15:27 -0000
From: Justin C <justin.0711@purestblue.com>
Subject: Re: OS X, installing modules from CPAN
Message-Id: <f1e.473b02ff.a5fb3@zem>

On 2007-11-13, J. Gleixner <glex_no-spam@qwest-spam-no.invalid> wrote:
> Justin C wrote:
>> I'm using OS X (10.4.10), I've installed a few modules system wide with:
>> 
>> sudo -H cpan -i Module::Name
>> 
>> I'd like to look at the build directory, there are some examples of the
>> module in use. The problem is, I can't find .cpan in /root... there is
>> no /root! 
>> 
>> Does anyone know where, under OS X, .cpan is? Not a user one, the one
>> that would be under /root on a Linux system.
>
> CPAN knows where.
>
> cpan> o conf cpan_home

Excellent, thank you. I tried 'man cpan' but that's only for
command-line stuff, and doesn't cover the cpan shell. Well, now I know,
and for anyone who's interested: /var/root/.cpan 


	Justin.

-- 
Justin C, by the sea.


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

Date: Wed, 14 Nov 2007 01:05:46 -0800
From:  sheinrich@my-deja.com
Subject: Re: peculiar behaviour with prototyped routines
Message-Id: <1195031146.776304.237060@o38g2000hse.googlegroups.com>

On Nov 14, 8:36 am, "cvh@LE" <christian.han...@cpi-service.com> wrote:
> Hi Steffen,
>
> Thanks for the very interesting link - a very enlightening read
> indeed.
>
> The recommendation with arrays is clear... I just needed an example.
That very much means it still isn't clear, does it? ;-)

Well, just forget about the prototypes.

Expl 1, putting the one array to the end:

do_something($v, $w, @t_array);

sub do_something {
  my ($scalar_1, $scalar_2, @array_in) = @_;
  # @array_in now containing everything from 3rd param to end
  ...
}

# that means that @array_in also fetches the surplus params in a
(willing or accidental) call like
do_something($v, $w, @t_array, $xyz, %t_hash);

Expl 2, passing references:
# references have very much in common with scalars.
# for this purpose they may be seen as such and can be passed in any
order
# as long as there is no actual array like above.
do_something(\@t_array, $v, \$w, \%t_hash);

sub do_something {
  my ($array_ref, $scalar_1, $scalar_ref, $hash_ref) = @_;

  my $scalar_in = $$scalar_ref;
  my @array_in  = @$array_ref;
  my %hash_in   = %$hash_ref;

  # $scalar_in, @array_in, and %hash_in now have the copied values
from their
  # outside counterparts $w, @t_array, and %t_hash.

  my $first_array_elem = $array_ref->[0];
  # OR
  $first_array_elem = $array_in[0];

  $array_ref->[24] = 'MeaningOE'; # changes outside variable @t_array
  $array_in[24] = 'MeaningOE'; # changes local copy @array_in

  my $peter_value = $hash_ref->{peter};
  # OR
  $peter_value = $hash_in{peter};

  $hash_ref->{alice} = 'down the tube'; # changes outside variable
@t_hash
  $hash_in{alice} = 'down the tube'; # changes local copy @hash_in

  ...
}


>
> What remains unclear, however, is your remark
>
> > "Make sure that that definition is seen by the compiler before it
> > compiles any calls to the function."

This not my remark, it is cited from the page. (thus the quotes)

>
> Now my question is how exactly am I supposed to that? How can I
> prototype a function,
> even before it is actually parsed by the compiler? Should I state 'C-
> like-header-files' containing
> only prototypes ?
The message is very clear:
Forget about Perl prototypes. Don't use them and don't even think
about them.
(especially when you are still struggling with the things above.)

In your example file testfile.pl you could put the 'reuire' in a BEGIN
block:
BEGIN {
  require "./testlib.pl";
}

Or you could make a proper module TestLib.pm and write
use TestLib;

In which both cases the testlib would be compiled before the function
calls in testfile.pl.
You will then observe the same output from both files.

But that's just for education. In praxis you should really stick to my
examples above.

Cheers,
Steffen



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

Date: Wed, 14 Nov 2007 09:45:45 -0000
From:  "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Trap memory overflow
Message-Id: <1195033545.146494.290140@d55g2000hsg.googlegroups.com>

I remember reading time ago that trapping memory overflow wasnt easy
in Perl.

Damn, now I have to allocate a lot of info in a 3dim structure:

my @AAA;      #  1st index: image index; 2nd: x coord; 3rd: y coord
 ...
$AAA[$i][$x][$y]=....
 ...

and it surely overflows since at some time the AAA structure does not
contains my info anymore - after of course having run for some hours
without problems ...

can somebody tell me how to trap the overflow?

thanks for any help!

Alessandro



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

Date: Wed, 14 Nov 2007 12:24:27 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Trap memory overflow
Message-Id: <r06r05-731.ln1@osiris.mauzo.dyndns.org>


Quoth "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>:
> I remember reading time ago that trapping memory overflow wasnt easy
> in Perl.

No. If you must try, see $^M in perlvar, and take note of the fact that
you'll probably have to rebuild perl to use it.

> Damn, now I have to allocate a lot of info in a 3dim structure:
> 
> my @AAA;      #  1st index: image index; 2nd: x coord; 3rd: y coord
> ...
> $AAA[$i][$x][$y]=....
> ...
> 
> and it surely overflows since at some time the AAA structure does not
> contains my info anymore - after of course having run for some hours
> without problems ...

That isn't memory exhaustion. Perl will exit with an untrappable error
when it runs out of memory, so you have some other problem.

Ben



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

Date: Wed, 14 Nov 2007 15:55:00 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Trap memory overflow
Message-Id: <fhf5us.1j8.1@news.isolution.nl>

alexxx.magni@gmail.com schreef:

> my @AAA;      #  1st index: image index; 2nd: x coord; 3rd: y coord
> ...
> $AAA[$i][$x][$y]=....


Is "image index" a consecutive range, starting at 0?

What is on the ...., a filename maybe? Maybe including a rather lengthy
and static path part?

Why not store the [$x,$y] as tuples?

my @AAA;

$AAA[0] = {
    xy => [$x, $y ],
    fn => "123.gif",
};

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 1032
***************************************


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