i have this problem where i would like to create a path and directories automatically. my script is :
so when i initialize Main, the sub that checks if there is a path to my specific variable is started. like :use strict; use lib "./Lib"; use Main; my $control = Main->new(); print "finished \n";
so my question is : do people tend to do it like this or is there some other more practical/elegant way to do it ?package Main; use strict; use File::Path qw(make_path remove_tree); ################################################## sub new { ################################################## my ($class)=@_; craete_path(); my $hash = {}; bless ($hash,$class); } sub create_path { # here it first checks if the path already exists or not, and if ther +e is no path, then it creates a path (with all necessary directory's) +. } 1;
thanks
In reply to how to create the path automatically by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |