in reply to Passing file location in a subroutine
G'day Rapazzini,
Welcome to the Monastery.
We are more than happy to help you; however, in order to do that, you need to provide appropriate information for us to do that. Telling us "I am unable to do so" gives us absolutely no clue as to what problem you have encountered. We have a page that answers the question "How do I post a question effectively?". Please read it.
When politely asked to add code tags to make your post more readable, the appropriate course of action is not to post an even larger tract of hard-to-read text. Perhaps you didn't know how to add code tags but you could've asked. We have a page that answers the question "How do I change/delete my post?". Please read it.
You clearly have little knowledge of Perl. That's fine: we all started with zero knowledge of Perl. I recommend you read "perlintro -- a brief introduction and overview of Perl". If you follow the advice therein, you'll at least be able to write Perl code that advises you of syntax errors and other real (or potential) problems. Here's an example of the type of feedback you might get (using one of the statements you posted):
$ perl -we 'my $(ipic) = $nec->locateAbsolutepath($ipic1);' Bareword found where operator expected at -e line 1, near "$(ipic" (Missing operator before ipic?) Unquoted string "ipic" may clash with future reserved word at -e line +1. Can't use global $( in "my" at -e line 1, near "my $(" syntax error at -e line 1, near "$(ipic" Execution of -e aborted due to compilation errors.
"How to call the method and pass the file location ..."
I recommend you read "perlootut - Object-Oriented Programming in Perl Tutorial". By the time you've read the first few screenfuls, you should have a basic answer to this.
For I more complete treatment of the subject, take a look at "perlobj - Perl object reference".
As I said at the start, we're happy to help; however, the onus is on you to provide us with sufficient information such that we can do that.
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing file location in a subroutine
by Rapazzini (Initiate) on Oct 16, 2015 at 07:05 UTC |