Re: passing arguments to perl function with - in the string

2011-11-30 Thread Brandon McCaig
On Wed, Nov 30, 2011 at 10:21:19AM -0500, Brandon McCaig wrote: > You can use subroutines to split functionality into multiple > pieces and store them each in a different file. Oops. xD That sounds like I suggest for you to use a different file for every subroutine. Of course I meant that you shou

Re: passing arguments to perl function with - in the string

2011-11-30 Thread Brandon McCaig
On Tue, Nov 29, 2011 at 06:19:59PM -0500, Nemana, Satya wrote: > Hi Brandon, Igor, Shawn Hello (not sure if it's proper to call you Nemana or Satya or if both names are necessary): > The horror was that the perl compiler pointed at a code some > 1000s of lines below this line for the error which

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Peter Scott
On Tue, 29 Nov 2011 18:19:59 -0500, Nemana, Satya wrote: > P.S : unfortunately, I cant provide more details due to the IP > restrictions, sorry about that, hope you understand, otherwise would > have posted the code in the first go. This is a common constraint. You can always post a version of th

RE: passing arguments to perl function with - in the string

2011-11-29 Thread Nemana, Satya
tions, sorry about that, hope you understand, otherwise would have posted the code in the first go. -Original Message- From: Brandon McCaig [mailto:bamcc...@gmail.com] Sent: 29 November 2011 15:15 To: Nemana, Satya Cc: beginners@perl.org Subject: Re: passing arguments to perl function with

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Brandon McCaig
On Tue, Nov 29, 2011 at 08:12:29AM -0500, Nemana, Satya wrote: > Hi Hello: > I need to pass argument to a function like this -chan_range => > "$chs-$che" > > Normally when this used which works -chan_range => "1-24" > > However, when I try to put variable values instead of a scalar string, I

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Shawn H Corey
On 11-11-29 08:12 AM, Nemana, Satya wrote: However, when I try to put variable values instead of a scalar string, I get compilation errors (the errors are in different part of the code which is completely clueless) Could you post the code that fails and its error message? -- Just my 0.000

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Igor Dovgiy
Hi Satya, Might I suggest to look up a bit into the function's source code? Because it's, well, pretty normal to call subs like that: ... some_func_call(-chan_range => "$beg-$end") ... Of course, $beg and $end variables should be defined already (and contain numeric values, as I see). If not, war

passing arguments to perl function with - in the string

2011-11-29 Thread Nemana, Satya
Hi Sorry for the silly question, but thought someone might help here.(tried googling but this may too silly a beginners question for anyone to have answered previously) I need to pass argument to a function like this -chan_range => "$chs-$che" Normally when this used which works -chan_range