Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- package Some::Name;
- sub shit {
- my $hs = qx("hostname");
- chomp($hs);
- return $hs;
- }
- unless(caller) {
- print "it is " . shit() . "\n";
- exit(0);
- }
- 1;
- #!/usr/bin/env perl
- use Cwd 'abs_path';
- use File::Basename 'dirname';
- use constant THISDIR => dirname abs_path __FILE__;
- my $THISDIR;
- BEGIN { $THISDIR = dirname abs_path __FILE__ }
- require "$THISDIR/mystuff.pl";
- my $str = Some::Name::shit();
- print "str from other file is $str\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement