#!/usr/bin/perl
use warnings;
use strict;
# Make sure we got a valid file in $ARGV[0]
die "Wrong usage\n" unless (defined $ARGV[0] and -f $ARGV[0]);
open my $FH, "< $ARGV[0]" or die "Can't open $ARGV[0] : $!\n"; # I
think it was #!...
my $count = 0;
my $linesPrinted = 0;
while (<$FH>) { # Count
"Zachary Shay" schreef:
> Is there any way to get the name of a variable by knowing its memory
> address?
Do you consider its ref-value as its memory address?
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
schms schreef:
> opendir DH, $DIR or die "Cannot open '$DIR' $!";
> print map "$DIR/$_\n", readdir DH;
> closedir DH;
Looks very 'global variables' oriented to me.
Compare to:
{ opendir my $dh, $dir
or die "Cannot open '$dir': $!";
while (my $e = readdir $dh) {
$
On Sep 28, 5:18 pm, [EMAIL PROTECTED] (Jeremy Kister) wrote:
> Given the below code, is there something that will warn/prevent me from
> declaring $variable when i really meant @variable ?
>
> I usually use perl -wTc scriptname to check for silliness, but i've
> realized code in the below fashion w