Thread Hilfe Bei Perl... (14 answers)
Opened by Gast at 2006-04-15 22:04

renee
 2006-04-18 11:34
#37222 #37222
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Man sollte sich aber gewisse Sachen angewöhnen (ich bin auch noch in der Lernphase ;) )

Es gibt schon gewissen unterschiede zwischen zwei Argumenten und drei Argumenten:

Aus perldoc open
Quote
Any two-argument open(), readpipe() (aka qx//) and similar
operators found within the lexical scope of this pragma will
use the declared defaults. Three-argument opens are not
affected by this pragma since there you (can) explicitly
specify the layers and are supposed to know what you are
doing.


Aus perldoc -f open
Quote
Use 3-argument form to open a file with arbitrary
weird characters in it,

open(FOO, '<', $file);

otherwise it's necessary to protect any leading and
trailing whitespace:

$file =~ s#^(\s)#./$1#;
open(FOO, "< $file\0");

(this may not work on some bizarre filesystems).
One should conscientiously choose between the magic
and 3-arguments form of open():
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Hilfe Bei Perl...