doubt in Definition of sub routine.
From: Anand V (Anand.V_at_gxs.com)
Date: 08/05/04
- Next message: Anon Ymous: "integrating C++ apps with perl"
- Previous message: Edward Wijaya: "How to pass two arrays as arg in a subroutine?"
- Next in thread: Gunnar Hjalmarsson: "Re: doubt in Definition of sub routine."
- Reply: Gunnar Hjalmarsson: "Re: doubt in Definition of sub routine."
- Maybe reply: Jeff 'Japhy' Pinyan: "Re: doubt in Definition of sub routine."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Thu, 5 Aug 2004 06:07:33 -0400
Hi All,
I am using code written by some one else. I didn't understand the difference
between these subroutines, the way they were defined.
1. sub addToLog { Some code } Any specific reason where we should
not use braces ??
2. sub displayEnv( ) { " } Any specific reason why we should
use braces ??
3. sub trim($) { " } Any specific reason why we should
use a brace with a $ sign in it ??
Could some one specify reason when to use braces and when not to use .
Replies are highly appreciated and thanks in advance for your help.
Regards
Anand
- Next message: Anon Ymous: "integrating C++ apps with perl"
- Previous message: Edward Wijaya: "How to pass two arrays as arg in a subroutine?"
- Next in thread: Gunnar Hjalmarsson: "Re: doubt in Definition of sub routine."
- Reply: Gunnar Hjalmarsson: "Re: doubt in Definition of sub routine."
- Maybe reply: Jeff 'Japhy' Pinyan: "Re: doubt in Definition of sub routine."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|