Thank you for the support. Let me clear the thing I have placed the .pm file code here.I now will try to explain it what I understood. I want to call it by using .pl where I will use the pic.pm file
package alter; sub onPerform { my $nec = shift; my $ipic1 = org::item::essential($nec, "Input Picture"); my $(ipic) = $nec->locateAbsolutepath($ipic1); };
"org::item::essential" is a module of to get some parameters and the "input picture" have to get the parameters that will be assigned to $ipic1. The $(ipic) will take the $ipic1. I want to call the subroutine "onPerform" to input the "Input Picture"
#!/usr/bin/perl -w use pic;#.pm file my $rapaz1 = 'C:/Users/RAPAZ/Desktop/try/pic12.jpeg'; my $rapaz = alter->onPerform(); $rapaz-> {"Input Picture"} = ($rapaz1);
The main problem is passing the file by calling the subroutine.Please help me how to call the subroutine and passthe file location "input picture" so that it gets the parameter and get prepared for $(ipic)

In reply to Re^4: Passing file location in a subroutine by Rapazzini
in thread Passing file location in a subroutine by Rapazzini

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.