anek77713 has asked for the wisdom of the Perl Monks concerning the following question:
Hey!
I have this code:
... my $chapter = shift; my $name = ( splitpath $chapter )[-1]; my $htmldir = catdir( qw( html ) ); $name =~ s/\.pod/\.html/; $name = catfile( $htmldir, $name ); open my $fh, '>:utf8', $name or die "Cannot write to '$name': $!\n"; print $fh; return $fh; }
And I get "GLOB(0x109ad10)" when printing "$fh" - how can I get the name of the file from $fh, not simply from "$name"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GLOB & FILE (filehandle doesn't store filename)
by Anonymous Monk on Aug 12, 2013 at 07:24 UTC | |
|
Re: GLOB & FILE
by jakeease (Friar) on Aug 12, 2013 at 07:31 UTC | |
by Anonymous Monk on Aug 12, 2013 at 09:39 UTC |