On 5/1/07, Somu <[EMAIL PROTECTED]> wrote:

 my $s = <>;
 my $t = <>;
 conc ( $s , $t );
 sub conc {
 my $str = $_[0].$_[1];
 print $str;
 }


 Why?

Why not?

It works allright only after add an extra line at the top, that is
  sub conc;
 its become just like C

Are you asking a question? Perhaps you want to know whether a
subroutine needs to be declared before using it. No, not in Perl. But
you may do so, as you found. Your code should work the same with or
without that declaration, I believe.

Are you complaining that Perl is similar to C? Are you rejoicing that
Perl is similar to C?

Are you having trouble expressing your question in English? Feel free
to ask in another language if you think that might help.

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to