Nifty thing

Christoph

my $port = 1;
$file = “/home/retail/perl/ports.txt”;
# Why do you declare $port with my, and then make $file
# a package variable?
while($port < 10000){
    # You’ve got to be kidding me…
    # See, in Perl, we have this nifty thing called a
    # for() loop. It’s very useful in situations like this.
    # for my $port (1..10000) {
    # …
    # }
[…]

Source: Direct link to the source code
Software: Perl Underground
Programming language: Perl

1 Star2 Stars3 Stars4 Stars5 Stars (3 Bewertungen, Durchschnitt: 5,00 von 5)
Loading...Loading...