in reply to calling perl subroutine from shell

perl -e 'use something; &aroutine(@ARGV); &blah(); $anythingyouwant="h +ere";' *.c
In this particular case, it sounds like you want:
perl -e 'use a; &clear_scr()'

Replies are listed 'Best First'.
Re^2: calling perl subroutine from shell
by bollinis (Initiate) on Apr 04, 2012 at 08:34 UTC
    Calling perl subroutine from shell script and pass @ARGV's

    Perl script : a.pl

    #!/usr/bin/perl -w

    use Exporter;
    @ISA = qw(Exporter);
    @EXPORT=qw(a(@ARGV));
    sub a{
    my($a,$b)=@_;

    print $a."\n";
    print $b."\n";
    }
    1;

    Shell script : b.sh
    #/bin/bash -e
    arg1=1;
    arg2=2;
    perl -e "require qw(a.pl) ; a($arg1, $arg2);"

    run ./b.sh

    output :
    1
    2