Question about %var construct 
Author Message
 Question about %var construct

I am working with Perl 4.035 on IBM RS/6000.  It appears that
the construct:

        if (%var)
        {
                some code...
        }

does not work becase %var always returns false.  Is this a
known bug?



Mon, 04 Nov 1996 20:54:59 GMT  
 Question about %var construct

Quote:

> I am working with Perl 4.035 on IBM RS/6000.  It appears that
> the construct:

>    if (%var)
>    {
>            some code...
>    }

> does not work becase %var always returns false.

Maybe you should try perl 4.036.  I'm using AIX 3.2.5, and if I do this:

        print $], "\n";

        %var = (
          'this', 'that',
          'these', 'those',
          );

        if (%var)
                {
                print join (", ", %var), "\n";
                }

I get this:

        $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
        Patch level: 36

        these, those, this, that

Adios,
  Logan

--
The genius of France can be seen at a glance
And it's not in their fabled fashion scene
It's not that they're mean, or their wine, or cuisine
I refer of course to the guillotine
(the French knew how to {*filter*})
                T-Bone Burnett, "I Can Explain Everything"



Wed, 13 Nov 1996 10:03:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. constructing a widget question

2. Copying /var/spool/mail and /var/spool/news with perl

3. Expand ENV var within another ENV var

4. *var{FILEHANDLE} and *var{DIRHANDLE}

5. $var->$method vs $var->$method()

6. $$var[xxx] vs ${var}[xxx]

7. Win32 perl how to do system(set var= $var)

8. Evaluating a var within a var from read file

9. my( $var ) vs my $var

10. undef ($var) the same as $var = undef ?

11. perlguts question: var swaps using list assignment

12. var assignment question

 

 
Powered by phpBB® Forum Software