I'm trying to use 'cat file' in my Perl module like below,
my $batch_dir = '/home/lsubramaniyam/xxx';
my $receive_file = $batch_dir->catfile("Recieve_file.txt");
But, on executing the script, I'm getting error as
Can't call method "catfile" without a package or object reference
I have included packages related to the file handles and OOPS,
use IO::All;
use IO::Socket;
use IO::Socket::SSL;
use Moo;
use MooX::HandlesVia;
use MooX::Options (
protect_argv => 0,
prefer_commandline => 1,
);
use MooX::Types::MooseLike::Base
qw(Bool Enum HashRef Int InstanceOf Maybe Str);
use File::Spec;
Please help me on steps to proceed further. Any help is appreciated.