"be consistent" | |
PerlMonks |
Re: Thanks !! (XML + Excel) with (win32::OLE and XML::Simple)by matrixmadhan (Beadle) |
on Dec 09, 2008 at 03:37 UTC ( [id://729072]=note: print w/replies, xml ) | Need Help?? |
I have got couple of comments to be updated
<?xml version="1.0" encoding="ISO-859-1"?> >>encoding information is wrong, that should be a typo to ISO-8589-1 opendir(DIR, "."); >> return status should be checked >> opendir(DIR, ".") or die "Unable to open directory <$!>\n"; closedir(DIR); >> closing the directory also might fail, its better to check the return status >> closedir(DIR) or die "Unable to close the directory <$!>\n"; while ($a ne "y") >> What if the user is not interested to process the xml files. This seems to be forcing user to select an option to process the files >> If this is going to be modified in such a way that user can input either "y" or "n", then prefetching of xml files into array should be done only after based on user's input $a = <STDIN>; chop $a; >> I think this is better chomp( $a = <STDIN ); my $xs1 = XML::Simple->new(); >> there is no need to create an object for each and every file >> same thing applies to other objects repeatitively created where just one instance can be made use of.
In Section
Seekers of Perl Wisdom
|
|