Hi, this is confusing way to write code
sub yada { ... }
print ...;
yada();
sub yadda {}
print...;
yadda();
If there is a problem with yada, or with the way you call yada, its difficult to tell, for no real reason, code doesn't need to be that confusing
You should write code like this #!/usr/bin/perl --
Main( @ARGV );
exit( 0 );
sub Main {
print ...;
yada();
print ...;
yadda();
...;
}
sub yada { ... }
sub yadda { ... }
Why write code this way?
Well if there is a problem with yadda or the way you call yada
Its super easy to delete all parts of the program that are not yada and then you you can fix yada easily,
Even if yadda is only a smart part of your large program
If you want to figure this out yourself this is what you have to do
If you want other people to help you figure this out, this is what you have to do
Are you going to do this?
|