Is this correct? print syntax

2002-10-11 Thread Nikola Janceski
Is this correct placement of the parenthesis? print FILEHANDLE (list_of_print_stuff); Nikola Janceski The straightest path is not the path of experience. -- Nicky J. from da' Bronx The views and

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
Parenthesis are optional for pre-defined subroutines, like Perl's built-in, so most users just leave them off when they're not needed: print FILEHANDLE list, of stuff, to print; On Friday, October 11, 2002, at 01:28 PM, Nikola Janceski wrote: > Is this correct placement of the parenthesis? >

RE: Is this correct? print syntax

2002-10-11 Thread Nikola Janceski
I need them.. for print FILEHANDLE (list, of, stuff), next if (condition); > -Original Message- > From: James Edward Gray II [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 11, 2002 2:39 PM > To: Nikola Janceski > Cc: Beginners (E-mail) > Subject: Re: Is this cor

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
2 2:39 PM >> To: Nikola Janceski >> Cc: Beginners (E-mail) >> Subject: Re: Is this correct? print syntax >> >> >> Parenthesis are optional for pre-defined subroutines, like Perl's >> built-in, so most users just leave them off when they're not need

Re: Is this correct? print syntax

2002-10-11 Thread Tim Musson
Hey Nikola, My MUA believes you used Internet Mail Service (5.5.2650.21) to write the following on Friday, October 11, 2002 at 2:28:27 PM. NJ> Is this correct placement of the parenthesis? NJ> print FILEHANDLE (list_of_print_stuff); The best thing to do is look at perldoc, and try it

RE: Is this correct? print syntax

2002-10-11 Thread Nikola Janceski
he fire I guess. > -Original Message- > From: Tim Musson [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 11, 2002 2:46 PM > To: [EMAIL PROTECTED] > Subject: Re: Is this correct? print syntax > > > Hey Nikola, > > My MUA believes you used Internet Mail Serv

RE: Is this correct? print syntax

2002-10-11 Thread Larry Coffin
>print FILEHANDLE (list, of, stuff), next if (condition); Why are you using a comma operator here and not just a semi-colon to terminate the print statement? I.e. why not: print FILEHANDLE (list, of, stuff); next if (condition); In both cases, the return value of print() is gett

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
On Friday, October 11, 2002, at 01:45 PM, Tim Musson wrote: > use strict; > use warnings; > print (list_of_print_stuff); # This gives an error I don't get any error with this, assuming I either make it a proper declared variable or quote it, in Perl 5.6.0. It's never wrong to use parenthesis

Re: Is this correct? print syntax

2002-10-11 Thread Tim Musson
Hey Nikola, My MUA believes you used Internet Mail Service (5.5.2650.21) to write the following on Friday, October 11, 2002 at 2:40:28 PM. NJ> I need them.. for NJ> print FILEHANDLE (list, of, stuff), next if (condition); This type of thing is common in my code when I am messing aroun

RE: Is this correct? print syntax

2002-10-11 Thread Jeff 'japhy' Pinyan
On Oct 11, Nikola Janceski said: >print(FILEHANDLE list, of, stuff, to, print), next if (condition); > >which I haven't tested. and do I need another comma in that?... ;) just >fueling the fire I guess. That is what you need. print (FH @args), next if condition; And no, do NOT put a comma af

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
On Friday, October 11, 2002, at 01:57 PM, Larry Coffin wrote: >> print FILEHANDLE (list, of, stuff), next if (condition); > > print FILEHANDLE (list, of, stuff); > next if (condition); > > In both cases, the return value of print() is getting tossed and > the 'next if (...)' is not depend

Re: Is this correct? print syntax

2002-10-11 Thread Steve Grazzini
Nikola Janceski <[EMAIL PROTECTED]> wrote: > Is this correct placement of the parenthesis? > > print FILEHANDLE (list_of_print_stuff); > Not really. It will usually work, but the FILEHANDLE is the first argument, so it ought to be: print(FH "foo", "bar"); -- Steve perldoc -qa.j | perl -

Re: Is this correct? print syntax

2002-10-11 Thread Paul Johnson
On Fri, Oct 11, 2002 at 02:57:21PM -0400, Larry Coffin wrote: > >print FILEHANDLE (list, of, stuff), next if (condition); > > Why are you using a comma operator here and not just a semi-colon > to terminate the print statement? I.e. why not: > > print FILEHANDLE (list, of, stuff); > next

Re: Is this correct? print syntax

2002-10-11 Thread Larry Coffin
At 3:05 PM -0400 10/11/02, James Edward Gray II wrote: >>> print FILEHANDLE (list, of, stuff), next if (condition); >> >> print FILEHANDLE (list, of, stuff); >> next if (condition); >But these two examples don't behave the same. The first one prints >and calls next, only on the condition. T

RE: Is this correct? print syntax

2002-10-11 Thread david
Nikola Janceski wrote: > I need them.. for > > > print FILEHANDLE (list, of, stuff), next if (condition); > you probably just want: print FILEHANDLE qw(list of stuff) and next if(condition); david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: Is this correct? print syntax

2002-10-12 Thread Michael Fowler
On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: > It's the indirect method call syntax, as far as I understand. It looks like it, but it isn't. See http:[EMAIL PROTECTED]/msg33969.html for a recent discussion on that. > Personally though, I wouldprefer to see your example

Re: Is this correct? print syntax

2002-10-12 Thread James Edward Gray II
On Friday, October 11, 2002, at 05:01 PM, Michael Fowler wrote: > On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: >> It's the indirect method call syntax, as far as I understand. > > It looks like it, but it isn't. See > http:[EMAIL PROTECTED]/msg33969.html for a > recent

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jeff 'Japhy' Pinyan) writes: > >>> if (condition) { >>> print FILEHANDLE list, of, stuff; >>> next; >>> } >> >I rarely do that. Unless the body of the block is going to be enormous, I >do it without the block. However, I think print(FOO

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Michael Fowler) writes: >On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: >> It's the indirect method call syntax, as far as I understand. > >It looks like it, but it isn't. See >http:[EMAIL PROTECTED]/msg33969.html for a re

Re: Is this correct? print syntax

2002-10-13 Thread Jeff 'japhy' Pinyan
On Oct 11, Michael Fowler said: >> if (condition) { >> print FILEHANDLE list, of, stuff; >> next; >> } > >I agree. It's much more readable. I rarely do that. Unless the body of the block is going to be enormous, I do it without the block. However, I think print(FOO @list) looks real