PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Sabherwal, Balvinder (MBS)" <Balvinder dot Sabherwal at mortgagefamily dot com>
Subject: RE: problem with using variable
Date: Jul 21 2003 12:30PM

>>
>>Yes, that's exactly what happens - the foreach loop sets the value of
>>$pwd for use inside the loop, but it clears it before exiting the loop.
>>
>>If your file has a single password in it I'd maybe use something like
>>this:
>>
>>{
>>   local $/ = undef;   # read the entire file in one go
>>   open(IN, "/tmp/passwd") || die "Can't open pwd file: $!";
>>   $pwd = ;
>>   $pwd =~ s/\s*$/;   # remove any trailing spaces
>>   chomp($pwd);
>>   close(IN);
>>}

This still is not helping. I tried and the script is still acting the same.
I did added the print after the block of code to make sure $pwd has right
value and it dose. Any more clues??