J
Jie
Hi,
I want to process a list. However, this list could exist as a provided
file, or in a hash created. I am thinking to use the following code,
first to find if this list exists in a file or in a hash, but this
code does NOT work.... Do I need to put "do something here" into a
function and then call this function? I am not very comfortable with
function though...
Your insight is appreciated!
jie
==============my piece of code==========
if ($list_file) {
open (LIST, "< $list_file") or die "Can't open file";
while (<LIST>) {
} else { ## this list is in a hash created previously
foreach $key (%LIST_HASH) {
}
!!!!do something here!!!;
}
I want to process a list. However, this list could exist as a provided
file, or in a hash created. I am thinking to use the following code,
first to find if this list exists in a file or in a hash, but this
code does NOT work.... Do I need to put "do something here" into a
function and then call this function? I am not very comfortable with
function though...
Your insight is appreciated!
jie
==============my piece of code==========
if ($list_file) {
open (LIST, "< $list_file") or die "Can't open file";
while (<LIST>) {
} else { ## this list is in a hash created previously
foreach $key (%LIST_HASH) {
}
!!!!do something here!!!;
}