
KevinR
Veteran

Jan 16, 2005, 3:38 PM
Post #2 of 3
(964 views)
|
Re: [why_perl] Adding data into Hashes
[In reply to]
|
Can't Post
|
|
here is one way, if you are sure of the data file being in the correct format:
open (FILE,"yourfile.xxx") or die "$!"; my %hash = <FILE>; close FILE; print "$hash{'Header:'}"; print "$hash{'Footer:'}"; the keys and values will still have the newlines on the end so you may need to chomp them if its a problem. -------------------------------------------------
(This post was edited by KevinR on Jan 16, 2005, 3:44 PM)
|