aloknath:

A couple of things:

  • You're aware that test is already in bash, aren't you? You might want to use a different name so future maintainers don't assume they know what test is.
  • Calling functions from bash isn't going to pass it variable values. It may be better to get more familiar with perl by converting the functions from bash to perl.
  • With the given system command, bash will try to execute commands that it already knows about. So you'll need to figure out a way to preload your functions.

    Overall, it's probably too much work, and probably too error prone to attempt it. (At least from my perspective...) Again, converting from bash to perl would be a good exercise, and shouldn't be very difficult.

    ...roboticus


    In reply to Re: Calling bash functions inside perl script by roboticus
    in thread Calling bash functions inside perl script by aloknath

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.