Gabor Szabo wrote:
> My point is that people learning perl or just using it not too
> frequently are constantly
> looking for copy paste examples. That is to solve problems without
> understanding the
> difference in 2 parameter and 3 parameter opens. I'd rather see them the safer
> solution and copy-paste that one, than the one that can lead to
> security problems.
I didn't realize it was a security issue.
>> Is it really necessary to initialize well-named sample scalars? It just
>> clutters up the examples.
>>
>> + $some_dir = "/home/foobar";
>> + opendir(my $dh, $some_dir) || die "can't opendir $some_dir: $!";
>
> It's well named for people with experience in such code and in reading
> perldoc. I agree.
> I am trying to change the docs to be clearer for those who have just
> started. That's
> the most difficult time.
While I'd tend to agree, $some_dir isn't particularly cryptic nor centric to a
particular operating system.
--
Life is like a sewer - what you get out of it depends on what you put into it.
- Tom Lehrer
Thread Previous
|
Thread Next