[30197] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1440 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 15 15:41:10 2008

Date: Tue, 15 Apr 2008 12:41:02 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 15 Apr 2008     Volume: 11 Number: 1440

Today's topics:
        empty array? <ela@yantai.org>
    Re: empty array? <RedGrittyBrick@SpamWeary.foo>
    Re: empty array? <someone@example.com>
    Re: empty array? <1usa@llenroc.ude.invalid>
    Re: every combination of Y/N in 5 positions <1usa@llenroc.ude.invalid>
    Re: FAQ 9.10 How do I decode or create those %-encoding <brian.d.foy@gmail.com>
    Re: FAQ 9.10 How do I decode or create those %-encoding <benkasminbullock@gmail.com>
    Re: FYI - How to add CPAN as a search plugin for Firefo <jettero@gmail.com>
    Re: FYI - How to add CPAN as a search plugin for Firefo <mintywalker@gmail.com>
        Getting started with HTTP::Proxy arvinporthog@lycos.com
        Gisle Aas's Illustrated Perl Guts? (J.D. Baldwin)
    Re: Gisle Aas's Illustrated Perl Guts? <Peter@PSDT.com>
    Re: Gisle Aas's Illustrated Perl Guts? <hansmu@xs4all.nl>
    Re: Gisle Aas's Illustrated Perl Guts? (J.D. Baldwin)
    Re: Gisle Aas's Illustrated Perl Guts? <Peter@PSDT.com>
    Re: Gisle Aas's Illustrated Perl Guts? (J.D. Baldwin)
        global variables in threaded perl programs iloveperl@abc.com
    Re: global variables in threaded perl programs <joost@zeekat.nl>
        How do I determine whether a filehandle is open? <devnull4711@web.de>
    Re: How do I determine whether a filehandle is open? <simon.chao@fmr.com>
    Re: How do I determine whether a filehandle is open? <joost@zeekat.nl>
    Re: How do I determine whether a filehandle is open? <devnull4711@web.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 11 Apr 2008 23:48:42 +0800
From: "Ela" <ela@yantai.org>
Subject: empty array?
Message-Id: <fto18u$cht$1@ijustice.itsc.cuhk.edu.hk>

Could anybody tell me why @x in the last line contains nothing? Thanks a 
lot.

$filename = $ARGV[0];

open(FP, $filename);
@x=();
@y=();
$i=0;
while ($line  = <FP>) 
{ 
chomp $line;
    print $line;
    @words = split(/\t/, $line);

    $x[$i] = $words[1];
    $y[$i++] = $words[2];
}
print @x;




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

Date: Fri, 11 Apr 2008 17:02:38 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: empty array?
Message-Id: <47ff8b9f$0$32041$da0feed9@news.zen.co.uk>

Ela wrote:
> Could anybody tell me why @x in the last line contains nothing? Thanks a 
> lot.

Have you tried starting your program with

use strict;
use warnings;

> 
> $filename = $ARGV[0];
> 
> open(FP, $filename);

Perhaps this failed?
Most people would check

   open my $FP, '<', $filename
     or die "can't open '$filename' - $!";

> @x=();
> @y=();

my @x;
my @y;

> $i=0;
> while ($line  = <FP>) 
> { 
> chomp $line;
>     print $line;
>     @words = split(/\t/, $line);

Each word in your data is separated by a single tab?
There are no leading tabs?

   print "DEBUG: [", join ("], [", @words, "]\n";

> 
>     $x[$i] = $words[1];

@words is a zero-based array. Presumably you intended to pick out only 
the second item of each line?

Perhaps there isn't a second item in your data?

>     $y[$i++] = $words[2];
> }
> print @x;
> 


-- 
RGB


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

Date: Fri, 11 Apr 2008 18:19:36 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: empty array?
Message-Id: <YYNLj.19$682.17@edtnps90>

Ela wrote:
> Could anybody tell me why @x in the last line contains nothing?

How do you know it contains nothing?

> Thanks a 
> lot.
> 
> $filename = $ARGV[0];

my $filename = $ARGV[0];

> open(FP, $filename);

open FP, '<', $filename or die "Cannot open '$filename' $!";

> @x=();
> @y=();
> $i=0;

my @x;
my @y;

> while ($line  = <FP>) 

while ( my $line = <FP> )

> { 
> chomp $line;
>     print $line;
>     @words = split(/\t/, $line);

       my @words = split(/\t/, $line);

>     $x[$i] = $words[1];
>     $y[$i++] = $words[2];

perldoc -f push

       push @x, $words[1];
       push @y, $words[2];

> }
> print @x;

print "The length of \@x is ", scalar @x, "\n";
print "The contents of \@x are", map( " '$_'", @x ), "\n";



John
-- 
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


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

Date: Fri, 11 Apr 2008 20:26:07 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: empty array?
Message-Id: <Xns9A7DA72FD6247asu1cornelledu@127.0.0.1>

"Ela" <ela@yantai.org> wrote in
news:fto18u$cht$1@ijustice.itsc.cuhk.edu.hk: 

> Could anybody tell me why @x in the last line contains nothing?

You could figure that out your self, you know.

> $filename = $ARGV[0];

use strict;
use warnings;

my ($filename) = @ARGV;

> open(FP, $filename);

open my $FP, '<', $filename
  or die "Cannot open '$filename': $!";

> @x=();
> @y=();
> $i=0;

my (@x, @y);

> while ($line  = <FP>) { 

while ( my $line = <FP> ) {

     last if $line =~ /^\s+$/; # end the loop 
                               # if there is nothing
                               # but whitespace

> chomp $line;
>     @words = split(/\t/, $line);


I don't know if you are expecting more than two tab separated 
fields.

    	my @words = split /\t/, $line;

>     $x[$i] = $words[1];
>     $y[$i++] = $words[2];

Is $words[1] an error or did you really mean to refer to the second 
element of @words?

    	push @x, $words[1];
    	push @y, $words[2];

> }

Anyway, here is a revised version of the program that does away with 
$i. Also, I replaced @words with two scalar variables: No point in 
putting the other fields in @words if you are not going to use them.

#!/usr/bin/perl

use strict;
use warnings;

my (@x, @y);

while ( my $line = <DATA> ) {
    last if $line =~ /^\s+$/;

    unless ( $line =~ /^[^\t](?:\t[^\t]+)+$/ ) {
        warn "Fields are not separated by tabs:\n'$line'";
        next;
    }

    my (undef, $wx, $wy) = split /\t/, $line;

    push @x, $wx;
    push @y, $wy;
}

use Data::Dumper;
print Dumper \@x;

__DATA__
1	2	3	4	5	6
a	b	c	d	e	f
alpha beta gamma delta epsilon zeta

C:\DOCUME~1\asu1\LOCALS~1\Temp> t1
Fields are not separated by tabs:
'alpha beta gamma delta epsilon zeta
' at C:\DOCUME~1\asu1\LOCALS~1\Temp\t1.pl line 12, <DATA> line 3.
$VAR1 = [
          '2',
          'b'
        ];



-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/


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

Date: Wed, 09 Apr 2008 20:21:40 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: every combination of Y/N in 5 positions
Message-Id: <Xns9A7BA66CFA0D2asu1cornelledu@127.0.0.1>

"Peter J. Holzer" <hjp-usenet2@hjp.at> wrote in
news:slrnfvpucg.1nn.hjp-usenet2@hrunkner.hjp.at: 

> For a beautiful (and rather famous) example, of a Perl obfu, see
> http://www.perlmonks.org/index.pl?node=camel code

ITYM:
http://www.perlmonks.org/index.pl?node=camel%20code

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/


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

Date: Tue, 15 Apr 2008 08:06:04 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 9.10 How do I decode or create those %-encodings on the web?
Message-Id: <150420080806044041%brian.d.foy@gmail.com>

In article <fu11nh$9sm$1@ml.accsnet.ne.jp>, Ben Bullock
<benkasminbullock@gmail.com> wrote:

> On Mon, 14 Apr 2008 18:03:02 -0700, PerlFAQ Server wrote:
> 
> > 9.10: How do I decode or create those %-encodings on the web?
> > 
> >     If you are writing a CGI script, you should be using the CGI.pm
> >     module that comes with perl, or some other equivalent module. The
> >     CGI module automatically decodes queries for you, and provides an
> >     escape() function to handle encoding.
> 
> This only deals with CGI scripts, but one might need to create a URI 
> encoding even when one is not writing a CGI script. Perhaps this FAQ 
> should mention the URI::Escape module too.

Good idea. I'll add that to my to do list.

Thanks, :)


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

Date: Tue, 15 Apr 2008 01:51:45 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: FAQ 9.10 How do I decode or create those %-encodings on the web?
Message-Id: <fu11nh$9sm$1@ml.accsnet.ne.jp>

On Mon, 14 Apr 2008 18:03:02 -0700, PerlFAQ Server wrote:

> 9.10: How do I decode or create those %-encodings on the web?
> 
>     If you are writing a CGI script, you should be using the CGI.pm
>     module that comes with perl, or some other equivalent module. The
>     CGI module automatically decodes queries for you, and provides an
>     escape() function to handle encoding.

This only deals with CGI scripts, but one might need to create a URI 
encoding even when one is not writing a CGI script. Perhaps this FAQ 
should mention the URI::Escape module too.



 


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

Date: Wed, 9 Apr 2008 14:55:16 -0700 (PDT)
From: Paul Miller <jettero@gmail.com>
Subject: Re: FYI - How to add CPAN as a search plugin for Firefox
Message-Id: <3ba8b722-0573-44f5-b02b-692095b380d5@m73g2000hsh.googlegroups.com>

On Apr 2, 1:42 pm, David Filmer <use...@davidfilmer.com> wrote:
> FWIW, Firefox comes with a several search plugins (Google, Yahoo, etc).
> These plugins are just XML files, and you can write your own.  I wrote
> one to make it just a little bit easier to search CPAN - I figured I'd
> put it out here for anyone that's interested.

Not to be a negative nelly, but I think other's may have beaten you to
it.  There are also a few other choices:

http://mycroft.mozdev.org/download.html?name=cpan

Though, honestly, I usually use this one:

http://mycroft.mozdev.org/download.html?name=perl%monks

Then I can search for mod://LWP::UserAgent, doc://perlxs or cpan://RSS
and get usefull answers.

-Paul


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

Date: Mon, 14 Apr 2008 03:15:04 -0700 (PDT)
From: mintywalker <mintywalker@gmail.com>
Subject: Re: FYI - How to add CPAN as a search plugin for Firefox
Message-Id: <f1b51f34-9ce3-4785-81a3-f37aa8c7903e@59g2000hsb.googlegroups.com>

On Apr 2, 9:55 pm, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> As an alternative, I have always preferred search keywords for this
> kind of stuff. Not as sexy, but works.

There is (imho) one key benefit to the search plugins, over the
location bar search keywords.  But it's not standard in most of them
except Google.

The Google search plugin has "keyword suggest".  Type in "perl" and it
suggests "perl split", "perlico", "perl hash", etc.  Perl is perhaps
not the best example, but I find it's a feature I like a lot.

Most of the other official plugins I've seen don't have this feature
(at least when I last looked).  However there is an easy hack to add
them:

Find your local copy of the plugin and add:

<Url type="application/x-suggestions+json" method="get"
       template="http://suggestqueries.google.com/complete/search?
output=firefox&amp;qu={searchTerms}"/>

Now you can have a Wikipedia plugin that suggests queries as you type
into the search box.  You can do the same for your Perl plugin.  Or
Amazon.

I almost switched to location bar search keywords, but having earlier
added the suggest feature to all my other plugins I found I missed it
too much.   If anyone knows a way to get the suggestions via the
location bar, do please let me know.

One big downside is that I've not been able to find a way to make the
generic Google Suggest feature site specific.  It would be most neat
if I could hack the url above to include "site:cpan.org" and have the
suggestions only come from that site.

That might not be trivial for Google to implement for all sites, but
you'll note that with (not a small) bit of work cpan (or Amazon, BBC,
YouTube etc) could implement their own site-specific version of this
suggest service to contextualize the suggestions in their plugin.  I
still find the service useful, even when it's not site specific.

With the caveat that this page was put together entirely for me, so
your mileage may vary, I have hacked the following plugins to include
the Google Suggest feature.  It would be much better if the standard
plugins did this themselves I think.

http://minty.org/search/

The reason I have my own Google plugin is because of the cruft that
the official Google Plugin introduces into the url.  It doesn't make
for copy&paste friendly.  My version generates the shortest url that
delivers the results.  One down side is that Mozilla probably don't
get the ad revenue because I've removed the magic url bits that say
"This was a search from a Mozilla product".

ps. Perhaps the cpan people could add a line like this to all their
markup, allowing people to add the plugin direct from the site:

<link rel="search" type="application/opensearchdescription+xml"
title="Search cpan!" href="http://.../cpan.osd" />


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

Date: Thu, 10 Apr 2008 13:11:58 -0700 (PDT)
From: arvinporthog@lycos.com
Subject: Getting started with HTTP::Proxy
Message-Id: <3bbe3b6d-4978-483b-94a3-04f30b1aefc3@s13g2000prd.googlegroups.com>

Hi. I don't know anything about proxies or networking yet I've been
tasked with protecting some content on a media server and I'm guessing
a proxy is the way to go. I'm playing around with HTTP::Proxy just to
get a feel for things. All of the examples and discussions seem geared
to a proxy which sits on a user's computer while what I want is to put
the proxy on an intermediate server between the user and the media
server. So just to test I set up a bare bones HTTP::Proxy script on
one of our web servers. It runs and I can connect to it but I don't
know where to start trying to get it to do more:


use strict;
use warnings;
use HTTP::Proxy;

my $proxy = new HTTP::Proxy (port => 8100, host => undef);
$proxy->start;


When I connect http://www.myserver.edu:8100 I get the message:
"Scheme  is not supported by this proxy."

How can I do something simple like pipe the google homepage to my
browser (not redirect!)?



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

Date: Fri, 11 Apr 2008 16:29:05 +0000 (UTC)
From: INVALID_SEE_SIG@example.com.invalid (J.D. Baldwin)
Subject: Gisle Aas's Illustrated Perl Guts?
Message-Id: <fto3kh$nti$1@reader2.panix.com>



I see a lot of references to "Gisle Aas's Illustrated Perl Guts" but
am unable to find a copy.  All the *.no links are broken.  Is a copy
available somewhere online?
-- 
  _+_ From the catapult of |If anyone disagrees with any statement I make, I
_|70|___:)=}- J.D. Baldwin |am quite prepared not only to retract it, but also
\      /  baldwin@panix.com|to deny under oath that I ever made it. -T. Lehrer
***~~~~-----------------------------------------------------------------------


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

Date: Sat, 12 Apr 2008 03:39:30 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Gisle Aas's Illustrated Perl Guts?
Message-Id: <pan.2008.04.12.03.39.30.112154@PSDT.com>

On Fri, 11 Apr 2008 16:29:05 +0000, J.D. Baldwin wrote:
> I see a lot of references to "Gisle Aas's Illustrated Perl Guts" but
> am unable to find a copy.  All the *.no links are broken.  Is a copy
> available somewhere online?

The web has a memory.  Have you tried
http://web.archive.org/web/*/http://gisle.aas.no/perl/illguts/ ?  I got
most of it after a few tries.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/



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

Date: Mon, 14 Apr 2008 02:08:09 +0200
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: Gisle Aas's Illustrated Perl Guts?
Message-Id: <4802a01c$0$14346$e4fe514c@news.xs4all.nl>

J.D. Baldwin wrote:
> 
> I see a lot of references to "Gisle Aas's Illustrated Perl Guts" but
> am unable to find a copy.  All the *.no links are broken.  Is a copy
> available somewhere online?

There's a copy at
http://www.perl.org/tpc/1998/Perl_Language_and_Modules/Perl%20Illustrated/

HTH,

-- HansM


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

Date: Mon, 14 Apr 2008 02:57:58 +0000 (UTC)
From: INVALID_SEE_SIG@example.com.invalid (J.D. Baldwin)
Subject: Re: Gisle Aas's Illustrated Perl Guts?
Message-Id: <ftuh7l$9s0$1@reader2.panix.com>


In the previous article, Hans Mulder <hansmu@xs4all.nl> wrote:
> > I see a lot of references to "Gisle Aas's Illustrated Perl Guts" but
> > am unable to find a copy.  All the *.no links are broken.  Is a copy
> > available somewhere online?
> 
> There's a copy at
> http://www.perl.org/tpc/1998/Perl_Language_and_Modules/Perl%20Illustrated/

Thanks, that's it!

Thanks to Peter, too, but I do kind of prefer the illustrated version
of "Illustrated Perl Guts."
-- 
  _+_ From the catapult of |If anyone disagrees with any statement I make, I
_|70|___:)=}- J.D. Baldwin |am quite prepared not only to retract it, but also
\      /  baldwin@panix.com|to deny under oath that I ever made it. -T. Lehrer
***~~~~-----------------------------------------------------------------------


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

Date: Mon, 14 Apr 2008 04:41:07 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Gisle Aas's Illustrated Perl Guts?
Message-Id: <pan.2008.04.14.04.41.07.653312@PSDT.com>

On Mon, 14 Apr 2008 02:57:58 +0000, J.D. Baldwin wrote:
> In the previous article, Hans Mulder <hansmu@xs4all.nl> wrote:
>> There's a copy at
>> http://www.perl.org/tpc/1998/Perl_Language_and_Modules/Perl%20Illustrated/
> 
> Thanks, that's it!
> 
> Thanks to Peter, too, but I do kind of prefer the illustrated version
> of "Illustrated Perl Guts."

The archive.org version has the images also.  Sometimes you need to be
patient.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/



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

Date: Mon, 14 Apr 2008 14:50:00 +0000 (UTC)
From: INVALID_SEE_SIG@example.com.invalid (J.D. Baldwin)
Subject: Re: Gisle Aas's Illustrated Perl Guts?
Message-Id: <ftvquo$cdm$1@reader2.panix.com>


In the previous article, Peter Scott <Peter@PSDT.com> wrote:
> > Thanks to Peter, too, but I do kind of prefer the illustrated
> > version of "Illustrated Perl Guts."
> 
> The archive.org version has the images also.  Sometimes you need to
> be patient.

I'll take your word for it.  I am not, in general, a patient man, but
I would have thought 72 hours was long enough to load an image from
the web.
-- 
  _+_ From the catapult of |If anyone disagrees with any statement I make, I
_|70|___:)=}- J.D. Baldwin |am quite prepared not only to retract it, but also
\      /  baldwin@panix.com|to deny under oath that I ever made it. -T. Lehrer
***~~~~-----------------------------------------------------------------------


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

Date: 12 Apr 2008 17:23:21 -0700
From: iloveperl@abc.com
Subject: global variables in threaded perl programs
Message-Id: <ftrjpp021br@drn.newsguy.com>

Hi,

I am thinking of writing a new script as a multi threaded
program. This is my first threaded program.
I wrote a small program to understand how
to share global variables in all threads.

use warnings;
use strict ;
use threads ;
use vars qw($sub1 $sub2) ;
$sub1 = 0 ;
$sub2 = 0 ;
my $thr1 = threads->new(\&sub1);
my $thr2 = threads->new(\&sub2);
sleep(10);
print "current $sub1  $sub2..\n" ;
sub sub1() {
   $sub1 = 1000 ;
   print "$sub1\n" ;
}
sub sub2() {
   $sub2 = 2000 ;
   print "$sub2\n" ;
}


In the above code it starts two threads in which global variables are           
set to a value.
output of the program

1000
2000
current 0  0..

why does the last print line does not take the value of 1000 or 2000.

thanks.

print "current $sub1  $sub2..\n" ;
it does not print 1000 and 2000. rather it



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

Date: Sun, 13 Apr 2008 02:28:13 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: global variables in threaded perl programs
Message-Id: <87lk3id2ea.fsf@zeekat.nl>

iloveperl@abc.com writes:

> In the above code it starts two threads in which global variables are           
> set to a value.
> output of the program
>
> 1000
> 2000
> current 0  0..
>
> why does the last print line does not take the value of 1000 or 2000.

Because no variables are shared by default. See perldoc threads::shared

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Fri, 11 Apr 2008 21:10:15 +0200
From: Frank Seitz <devnull4711@web.de>
Subject: How do I determine whether a filehandle is open?
Message-Id: <669rcuF2jengdU2@mid.individual.net>

I didn't find it in the FAQ.
How do I determine whether a filehandle
(STDERR in my case) is open?

Frank
-- 
Dipl.-Inform. Frank Seitz; http://www.fseitz.de/
Anwendungen für Ihr Internet und Intranet
Tel: 04103/180301; Fax: -02; Industriestr. 31, 22880 Wedel


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

Date: Fri, 11 Apr 2008 12:23:04 -0700 (PDT)
From: nolo contendere <simon.chao@fmr.com>
Subject: Re: How do I determine whether a filehandle is open?
Message-Id: <9087601f-45c1-4e73-ad0c-e7f2fb88f392@a22g2000hsc.googlegroups.com>

On Apr 11, 3:10=A0pm, Frank Seitz <devnull4...@web.de> wrote:
> I didn't find it in the FAQ.
> How do I determine whether a filehandle
> (STDERR in my case) is open?

if ( defined fileno STDERR ) {
     print STDERR "SOME DATA";
}
else {
     warn "Error: STDERR is closed!\n";
}



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

Date: Fri, 11 Apr 2008 21:23:37 +0200
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: How do I determine whether a filehandle is open?
Message-Id: <87abk09ow6.fsf@zeekat.nl>

Frank Seitz <devnull4711@web.de> writes:

> I didn't find it in the FAQ.
> How do I determine whether a filehandle
> (STDERR in my case) is open?

see perldoc -f fileno

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Fri, 11 Apr 2008 21:32:59 +0200
From: Frank Seitz <devnull4711@web.de>
Subject: Re: How do I determine whether a filehandle is open?
Message-Id: <669snjF2jengdU3@mid.individual.net>

nolo contendere wrote:
> On Apr 11, 3:10 pm, Frank Seitz <devnull4...@web.de> wrote:
> 
>>I didn't find it in the FAQ.
>>How do I determine whether a filehandle
>>(STDERR in my case) is open?
> 
> if ( defined fileno STDERR ) {
>      print STDERR "SOME DATA";
> }
> else {
>      warn "Error: STDERR is closed!\n";
> }

Simon, Joost: Thank you!

Frank
-- 
Dipl.-Inform. Frank Seitz; http://www.fseitz.de/
Anwendungen für Ihr Internet und Intranet
Tel: 04103/180301; Fax: -02; Industriestr. 31, 22880 Wedel


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

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


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