H
Henry Townsend
I have an irritating little problem - I have a hash (generated by
Data:umper) underneath a __DATA__ token and want the script to 'do'
it. E.g. something like this (freehand):
my $hash = do <DATA>;
__DATA__
(Data:umper output)
But unfortunately according to "perldoc -f do" it's only defined to
operate on a file name, not a file handle. I really don't want to store
the data in a separate file. Does anyone know a way to drag this stuff
in as if it was in a separate file and I could use "do 'filename'"?
Thanks,
HT
Data:umper) underneath a __DATA__ token and want the script to 'do'
it. E.g. something like this (freehand):
my $hash = do <DATA>;
__DATA__
(Data:umper output)
But unfortunately according to "perldoc -f do" it's only defined to
operate on a file name, not a file handle. I really don't want to store
the data in a separate file. Does anyone know a way to drag this stuff
in as if it was in a separate file and I could use "do 'filename'"?
Thanks,
HT