Now your reading code can simply be:
my $x=join "",<FILE>; my %graph = eval $x;
Please don't use string-eval to read data files. CPAN has several data file readers that don't crash your program or erase your harddisk if the data file contains unexpected data. Think about JSON, YAML, or, if you have no better idea, XML. None of those formats is read as executable code.
And if you really can't avoid string-eval, at least use Safe in a "deny-almost-everything" configuration.
Alexander
In reply to Re^4: Paths::Graph use
by afoken
in thread Paths::Graph use
by zakishah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |