On 4/1/2004 5:01 PM, [EMAIL PROTECTED] wrote:

People of the Perl,

from my understanding strict disallows soft references, ensures that all variables are declared before usage and disallows barewords except for subroutines.

what is a soft reference?
what is a bareword?
why is strict disallowing a compile here.... When I comment out strict the syntax checks outs as ok!???

perldoc strict


answers all of the above questions. Those below have already been answered.

how do I display each element # with its corresponding data line, b/c I only want certain elements printed out?

thank you!

# Set pragma

use strict;

&tsm_critical_servers;

# Declare sub

sub tsm_critical_servers {

my $crout="/tmp/critical_servers.out";

# Make system call for data gathering

system ("dsmadmc -id=menu -password=xxxxxx 'q event * * begind=-1 begint=15:30 endd=today endtime=now' > $crout");
# Create array and read in each line as a seperate element
open (CRITICALSERVERS, "$crout") || die "can't open file \n: $!";
while ( defined($line = <CRITICALSERVERS>) ) {
chomp ($line);
my @tsm = <CRITICALSERVERS>;
foreach $_ (@tsm) {
print $_;
}
}
close (CRITICALSERVERS);
}



Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams





-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to