E
ed
Hey all. This is probably a elementary question, but I can't
seem to be able to find a builtin function or combination of functions
that will let me achieve this.
I want to get the full path to a file that is pointed to from a
reference to a type glob.
Below is a simple example of what I want to do.
## start perl script ##
use strict;
use warnings;
open(FH, '<', './testees/noname4.html')
or die("can't open file: $!");
&doSomething(\*FH);
close FH;
sub doSomething
{ my $FH = shift;
# I need the name of the file that
# $FH points to, to do something!
# something like filename($FH) would be nice.
}
## end perl script ##
There's a few things I can do to get around this problem.
But now I'm just curious of how this could be done.
tia,
--ed
seem to be able to find a builtin function or combination of functions
that will let me achieve this.
I want to get the full path to a file that is pointed to from a
reference to a type glob.
Below is a simple example of what I want to do.
## start perl script ##
use strict;
use warnings;
open(FH, '<', './testees/noname4.html')
or die("can't open file: $!");
&doSomething(\*FH);
close FH;
sub doSomething
{ my $FH = shift;
# I need the name of the file that
# $FH points to, to do something!
# something like filename($FH) would be nice.
}
## end perl script ##
There's a few things I can do to get around this problem.
But now I'm just curious of how this could be done.
tia,
--ed