[plug] [OT]how to do this in perl?

John Usher (Maptek) John.Usher at perth.maptek.com.au
Thu Aug 12 11:22:17 WST 2004


>Why not do whatever you want to $_ and then add it to an array or
string
>that you can use outside the loop. And depending on the type of loop,
$_
>is not always the counter. Eg:
>
>foreach (@fudd) {
># $_ is equal to the current item in the array.
>push (@duff, $_ . 'hello');
>}


If this is how the code works, using

foreach $item (@fudd) {
...

will use $item for the item rather than $_.

This may be the fix, but, not seeing any code, we can only guess...



More information about the plug mailing list