Bob, Michael, my thanks to you both for answering my diamond operator
question.
Bob, I tried the lines you suggested and they worked just the way I wanted
them to. Thanks.
Michael, thanks for the user functions or subroutines: not sure what Python
calls them. A lot of food for thought there. M
On Thursday 22 September 2005 23:46, [EMAIL PROTECTED] wrote:
> I am coming to Python from Perl. Does Python have anything like the diamond
> operator found in Perl?
The correct answer is not really no, but you can manually perform the
same tasks. For those who don't know perl, <> is an incredibly
At 04:37 AM 9/23/2005, [EMAIL PROTECTED] wrote:
>[snip]
>In perl I can write this:
>
>@array = <>;
>print @array;
>
>If I save that and call it from the command line, I can include the name of a
>file after the script name. It will read in the file, putting each line
>into an
>element of the array
bob wrote <<>>
Sorry bob, that's what comes of posting my question last thing at night when
finding the way upstairs is difficult enough.
In perl I can write this:
@array = <>;
print @array;
If I save that and call it from the command line, I can include the name of a
file after the script na
>It is included as part of the standard
>library (as are all the modules in the doc
>Danny referenced).
Thanks, Kent.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
[EMAIL PROTECTED] wrote:
>>>I am coming to Python from Perl. Does Python have
>>>anything like the diamond operator found in Perl?
>
>
>
>>Python includes a module called 'fileinput' that does sorta this:
>> http://www.python.org/doc/lib/module-fileinput.html
>>If you have more questions, ple
>> I am coming to Python from Perl. Does Python have
>>anything like the diamond operator found in Perl?
>Python includes a module called 'fileinput' that does sorta this:
>http://www.python.org/doc/lib/module-fileinput.html
>If you have more questions, please feel free to ask.
>Good luck
At 03:46 PM 9/22/2005, [EMAIL PROTECTED] wrote:
>I am coming to Python from Perl. Does Python have anything like the diamond
>operator found in Perl?
Some of us (who don't know Perl) might help you if you tell us what the
diamond operator does. How could we get to first base with it? What are its
On Thu, 22 Sep 2005 [EMAIL PROTECTED] wrote:
> I am coming to Python from Perl. Does Python have anything like the
> diamond operator found in Perl?
Hi Kim,
According to 'perldoc perlop':
"""
The null filehandle <> is special: it can be used to emulate the
behavior of sed and a
I am coming to Python from Perl. Does Python have anything like the diamond
operator found in Perl?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
10 matches
Mail list logo