What actually sets the default variable?
I am setting an array up, @targets, and then calling the current object in
the array via $_...but if I set another variable after setting up the
array, with it takeover the place of $_ ?
Tim Grossner
voice - 217-438-6161
pager - 217-467-3148
cell
I am using a for (@targets) loop to connect to cisco routers...if the
target is unreachable I need it to go on to the next target in the array
@targets. What should I look for? An "else" statement or what?
Tim Grossner
voice - 217-438-6161
pager - 217-467-3148
cell - 217-971
I want to open a file:
open (CONFIG, ">/tftpboot/$_");
chmod (0777, "/tftpboot/$_");
but i want to make the filename be $_."the current date"
the localtime function doesnt look very promising, as the output is not
very human readable :-)
Any thoughts?
Thats the one I want! Works like a charm now :-)
On Sun, 24 Jun 2001, Jos I. Boumans wrote:
> Hi,
>
> I think what you mean is this:
>
> for(@foo){ print "$_\n" } # ie, $_ holds the element of @foo you're
> currently looking at
>
> you can also explicitly name it like so:
>
> for my $elem
I am using a for like so:
for(@targets) {
...stuff...
}
What variable can I use to specify the CURRENT target to operate on?
for instance:
for(@targets) {
...stuff...("VARIABLE THAT IS EQUAL TO THE CURRENT TARGET")
}
Tim Grossner
voice - 217-438-6161
pager - 217-467-3148
cell