Home > Archive > PERL Beginners > December 2006 > Re: reg exp continued need pulled from reference
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: reg exp continued need pulled from reference
|
|
| Derek B. Smith 2006-12-13, 4:10 pm |
| --- Lawrence Statton XE2/N1GAK <lawrence@cluon.com>
wrote:
> If you're dealing with variable length strings,
> separated by some kind
> of character, then regexp is the tool you want, not
> substr.
>
> This snippet will work so long as hostname and
> platform name are made
> up of \w ... if not, substitute in an appropriate
> character class.
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> foreach my $filename (qw (
> /home/dbsmith/passwd.dubhpr01.sun
> /some/other/path/passwd.fizzbox.hpux
> /yet/another/path/passwd.gronko.aix
> /still/more/paths/to/passwd.foohost.linux
> )
> ) {
> my ($hostname, $platform) = $filename =~
> m|\.(\w+)\.(\w+)$|;
> print "Hostname: $hostname, Platform:
> $platform\n";
> }
I am using Spreadsheet::WriteExcel to populate certain
columns which is working, but in column A for example
I am using the method write_col which requires a
reference, I am printing the absolute path
/home/dbsmith/passwd.dubhpr01.sun when all I need to
print is sun and in column B all I will need is
dubhpr01 or the hostname. For this reason I am trying
to use a regexp to grab $1 and $2 or sun and dubhpr01
then use write_col method. This is not working and in
my test code I want to know what data structure to
use.
use strict;
use warnings;
use Data::Dumper;
my $string = qw(/home/dbsmith/passwd.dubhpr01.sun);
my ($host,@OS) = $string =~ m|\.(\w+\d+)\.(\w+)$|i;
my $aref = \$host;
my $aref2 = \@OS;
#print $1,"\n";
#print $2,"\n";
if (ref ($aref) eq "SCALAR") {
print "yes\n";
}
print "newline\n";
if (ref ($aref2) eq "ARRAY") {
print "YES\n";
}
print ${$aref},"\n";
print @{$aref2}[0],"\n";
__OUTPUT__
yes
newline
YES
dubhpr01
sun
so my question 1 is what is @{$aref2}[0] and
why isn't write_col writing its data from my code
below:
##-- Write data from ref and format cells A2 and down
--##
my $string = qw(/home/dbsmith/passwd.dubhpr01.sun);
my @host = $string =~ m|\.(\w+\d+)$|i;
my $aref = \@host;
print @{$aref},"\n";
if (ref ($aref) eq "ARRAY") {
print "YES\n";
$worksheet->write_col('A2',$aref,$sheet_format);
}
I then tried
$worksheet->write_col('A2',@{$aref},$sheet_format);
and I get error:
Not an array ref in call to write_row()No such file or
directory at uid_check.pl line 121
main::__ANON__('Not an array ref in call to
write_row()No such file or direct...') called at
/opt/perl/lib/5.8.2/Carp.pm line 191
Carp::croak('Not an array ref in call to
write_row()No such file or directory') called at
/opt/perl/lib/site_perl/5.8.2/Spreadsheet/WriteExcel/Worksheet.pm
line 1354
Spreadsheet::WriteExcel::Worksheet::writ
e_col(1,0,'Spreadsheet::WriteExcel::Form
at=HASH(0x40610804)')
called at uid_check.pl line 121
thank you
derek
| |
| Charles K. Clarkson 2006-12-13, 4:10 pm |
| Derek B. Smith <mailto:derekbellnersmith@yahoo.com> wrote:
: I then tried
Try something simpler, not more complex. Test this case.
my @hosts = ( 'sun' );
$worksheet->write_col( 'A2', \@hosts, $sheet_format );
If it fails testing then there may be a problem with
write_col() or with the setup for the object $worksheet.
If it does test okay then the problem may be in the
data manipulation just before the call to write_col().
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
Free Market Advocate
Web Programmer
254 968-8328
http://www.clarksonenergyhomes.com/
Don't tread on my bandwidth. Trim your posts.
| |
| Lawrence Statton XE2/N1GAK 2006-12-13, 4:10 pm |
| > --- Lawrence Statton XE2/N1GAK <lawrence@cluon.com>
> I am using Spreadsheet::WriteExcel to populate certain
> columns which is working, but in column A for example
> I am using the method write_col which requires a
> reference,
Not just "a reference" but an ARRAY reference for all the values that
will go into that column (or a reference to an array of arrayrefs to
write a rectangular area in one shot). The example about a fifth of
the way through the Spreadsheet::WriteExcel pod shows it pretty clearly.
> I am printing the absolute path
> /home/dbsmith/passwd.dubhpr01.sun when all I need to
> print is sun and in column B all I will need is
> dubhpr01 or the hostname.
So stop printing what you don't need, and start printing what you do
need :) :) :) This code is not writing itself -- you have to take a
smidgeon of responsibility for its output.
> For this reason I am trying
> to use a regexp to grab $1 and $2 or sun and dubhpr01
> then use write_col method. This is not working and in
> my test code I want to know what data structure to
> use.
>
Are you sure that write_col is the method you want to use in this
case?
> use strict;
> use warnings;
> use Data::Dumper;
> my $string = qw(/home/dbsmith/passwd.dubhpr01.sun);
> my ($host,@OS) = $string =~ m|\.(\w+\d+)\.(\w+)$|i;
> my $aref = \$host;
> my $aref2 = \@OS;
Slow down a bit -- think about what you are writing. I don't want to
seem bitchy, but you often post code that looks like you just keep
throwing code into the file willy-nilly trying to see what sticks.
This code CLEARLY has that feel.
>
> #print $1,"\n";
> #print $2,"\n";
> if (ref ($aref) eq "SCALAR") {
> print "yes\n";
> }
> print "newline\n";
>
> if (ref ($aref2) eq "ARRAY") {
> print "YES\n";
> }
> print ${$aref},"\n";
> print @{$aref2}[0],"\n";
>
> __OUTPUT__
>
> yes
> newline
> YES
> dubhpr01
> sun
>
> so my question 1 is what is @{$aref2}[0] and
$aref2 is [ 'sun' ]
@{$aref2} is ( 'sun' )
@{$aref2}[0] is 'sun'
Perhaps the reason you find yourself getting confusing output is your
confusing variablenames. "aref2" says nothing about the data it
contains, and is dangerously similar to "aref". If you are debugging
something, you are going to see what SHOULD be there instead of what
IS there.
> why isn't write_col writing its data from my code
> below:
>
> ##-- Write data from ref and format cells A2 and down
> --##
>
> my $string = qw(/home/dbsmith/passwd.dubhpr01.sun);
> my @host = $string =~ m|\.(\w+\d+)$|i;
> my $aref = \@host;
>
> print @{$aref},"\n";
> if (ref ($aref) eq "ARRAY") {
> print "YES\n";
> $worksheet->write_col('A2',$aref,$sheet_format);
> }
It worked for me. (Outside of the fact I had to redact the
$sheet_format because you didn't post a complete runnable program.)
>
> I then tried
>
> $worksheet->write_col('A2',@{$aref},$sheet_format);
>
> and I get error:
> [error redacted]
Well, the documentation pretty clearly calls for an arrayref in the
second argument to write_col, so I have no idea why you tried passing
in an array.
>
>
> thank you
> derek
>
| |
| Derek B. Smith 2006-12-13, 4:10 pm |
| --- Lawrence Statton XE2/N1GAK <lawrence@cluon.com>
wrote:
> <lawrence@cluon.com>
> certain
> example
>
>
> Not just "a reference" but an ARRAY reference for
> all the values that
> will go into that column (or a reference to an array
> of arrayrefs to
> write a rectangular area in one shot). The example
> about a fifth of
> the way through the Spreadsheet::WriteExcel pod
> shows it pretty clearly.
>
> to
>
> So stop printing what you don't need, and start
> printing what you do
> need :) :) :) This code is not writing itself --
> you have to take a
> smidgeon of responsibility for its output.
>
>
> dubhpr01
> and in
>
> Are you sure that write_col is the method you want
> to use in this
> case?
>
> qw(/home/dbsmith/passwd.dubhpr01.sun);
> m|\.(\w+\d+)\.(\w+)$|i;
>
> Slow down a bit -- think about what you are writing.
> I don't want to
> seem bitchy, but you often post code that looks like
> you just keep
> throwing code into the file willy-nilly trying to
> see what sticks.
> This code CLEARLY has that feel.
>
>
> $aref2 is [ 'sun' ]
> @{$aref2} is ( 'sun' )
> @{$aref2}[0] is 'sun'
>
>
> Perhaps the reason you find yourself getting
> confusing output is your
> confusing variablenames. "aref2" says nothing about
> the data it
> contains, and is dangerously similar to "aref". If
> you are debugging
> something, you are going to see what SHOULD be there
> instead of what
> IS there.
>
> down
> qw(/home/dbsmith/passwd.dubhpr01.sun);
> $worksheet->write_col('A2',$aref,$sheet_format);
>
> It worked for me. (Outside of the fact I had to
> redact the
> $sheet_format because you didn't post a complete
> runnable program.)
>
> $worksheet->write_col('A2',@{$aref},$sheet_format);
>
> Well, the documentation pretty clearly calls for an
> arrayref in the
> second argument to write_col, so I have no idea why
> you tried passing
> in an array.
>
>
I know its an ARRAY reference why u think I wrote eq
"ARRAY".
I am not 100% sure write_col is the method I need,
that is why I post emails to this list, but I need to
write data in each respective column so using
write_col seems logical.
Sorry u think that, but I do think about what I write
and how to get to my end goal and yes you do sound
bitchy and rude! My apoligies I am not a Perl know it
all but this list is for posting questions so why do
people like u have to make things more difficult by
being negative?
yes the code I provided with the OUTPUT was only test
code or as u state it "willy nilly." I did not want to
post all 186 lines so I took out what is not working
which is know as a snippett.
If you seem to have all the Perl knowledge then get
this code working and send me the output BECAUSE IT IS
NOT WORKING FOR ME!
| |
| Derek B. Smith 2006-12-13, 4:10 pm |
| --- "Charles K. Clarkson" <cclarkson@htcomp.net>
wrote:
> Derek B. Smith <mailto:derekbellnersmith@yahoo.com>
> wrote:
>
>
> : I then tried
>
> Try something simpler, not more complex. Test
> this case.
>
> my @hosts = ( 'sun' );
> $worksheet->write_col( 'A2', \@hosts, $sheet_format
> );
>
>
> If it fails testing then there may be a problem
> with
> write_col() or with the setup for the object
> $worksheet.
>
> If it does test okay then the problem may be in
> the
> data manipulation just before the call to
> write_col().
>
>
>
> HTH,
>
> Charles K. Clarkson
> --
that worked, thank you...will keep trying.
| |
| Dr.Ruud 2006-12-13, 9:58 pm |
| Lawrence Statton XE2/N1GAK schreef:
> @{$aref2}[0] is 'sun'
ITYM:
${$aref2}[0] is 'sun'
--
Affijn, Ruud
"Gewoon is een tijger."
| |
| Lawrence Statton XE2/N1GAK 2006-12-14, 6:59 pm |
| Ahh, good catch....
| |
| Oryann9 2006-12-15, 6:59 pm |
| "Dr.Ruud" <rvtol+news@isolution.nl> wrote: Lawrence Statton XE2/N1GAK schreef:
> @{$aref2}[0] is 'sun'
ITYM:
${$aref2}[0] is 'sun'
--
Affijn, Ruud
"Gewoon is een tijger."
--
Ok everyone, I have thought about this one and tried various code changes but cannot get what I want.
My problem: redundant UIDs in password files.
My solution:
#1 store passwd files in a globbed array
#2 create array reference from globbed array
#3 open array ref, create hash with more than one value per key. Keys are regexps from filenames
#4 read in every line of passwd files from reference. Values in hash need to be passwd entries
For example: key => servernames.platform (dubhpr01.hpux)
values => filelds from passwd file (name,uid,gid,comments)
#5 Once hash is built, traverse through searching for usernames that have unlike UIDs from all files, then print these to an xls using SpreadSheet::WriteExcel.
In my code I have completed 1,2 and 3. Started 4 but I am printing the array reference address as opposed to printing the actual values. What am I doing wrong and any tips would be nice? thank you
_OUTPUT_
KEY dubhst14.hpux
ELEMENTS /home/dbsmith/passwd.dubhst14.hpux
DUB VALUES root
KEY dubhdv05.hpux
ELEMENTS /home/dbsmith/passwd.dubhdv05.hpux
DUB VALUES root
dubhst14.hpux => ARRAY(0x4002b0f8)
dubhdv05.hpux => ARRAY(0x4059c9a4)
dubhadm3.hpux => ARRAY(0x4059c8f0)
dwhetls2.hpux => ARRAY(0x4002c164)
dubhadm1.hpux => ARRAY(0x4059c8a8)
oftappp1.hpux => ARRAY(0x405a2084)
dubhpr28.hpux => ARRAY(0x4002e1bc)
cic2.hpux => ARRAY(0x4059c6f8)
#!/usr/bin/perl
##-- Initialize environment --##
use strict;
use warnings;
use diagnostics;
use Spreadsheet::WriteExcel;
#use Data::Dumper;
$ENV{"PATH"} = qq(/usr/bin:/bin:/home/dbsmith:/home/dbsmith/McGaw);
delete @ENV{qw (IFS CDPATH ENV KSH_ENV BASH_ENV)};
##-- Central DIE routine --##
open (LOG, ">>/tmp/uid_ck.log") or warn "uid_ck.log did not open $!";
my $overide = $SIG{__DIE__}; ## get error handler currently assigned 2 die
$SIG{__DIE__} = sub {
my $error = shift; ## error now holds the mesg passed to die
$overide->($error) if ( ref $overide );
print LOG ($error);
};
##-- BEGIN MAIN --##
my @dublinaray = glob("/home/dbsmith/passwd.*");
my $dublin_aref = \@dublinaray;
my @mcgawaray = glob("/home/dbsmith/McGaw/passwd.*");
my $mcgaw_aref = \@mcgawaray;
my (%dublin_hosts,%mcgaw_hosts) = ();
my ($dub_key,$dub_values,$mcg_key,$mcg_valu
es);
parse_file();
sub parse_file {
foreach my $element ( @{$dublin_aref} ) {
{ local *FILE;
open (FILE, "+<$element") or die "dublin reference did not open: $!";
local $/ = undef;
($dub_key) = $element =~ m|\.(\w+\.\w+)\z|i;
($dub_values) = split /:/, <FILE>;
push ( @{$dublin_hosts{$dub_key}}, $dub_values );
print "KEY\t",$dub_key,"\n\n";
print "ELEMENTS\t",$element,"\n\n";
print "DUB VALUES\t",$dub_values,"\n\n";
}
}
while ( ($dub_key,$dub_values) = each %dublin_hosts ) {
print "$dub_key => $dub_values\n";
}
#foreach my $host (sort keys %dublin_hosts) {
# print "$host: @{$dublin_hosts{$dub_key}}\n";
#}
#foreach my $element2 ( @{$mcgaw_aref} ) {
# { local *FILE2;
# open (FILE2, "+<$element2") or die "mcgaw reference did not open: $!";
# local $/ = undef;
# ($mcg_key) = $element2 =~ m|\.(\w+\.\w+)\z|i;
# push (@{$mcgaw_hosts{$mcg_key}}, $mcg_values );
# print "\n$element2\n\n";
# print <FILE2>;
# }
#}
} ##-- END SUB --##
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
| |
| Oryann9 2006-12-15, 6:59 pm |
| oryann9 <oryann9@yahoo.com> wrote:
"Dr.Ruud" wrote: Lawrence Statton XE2/N1GAK schreef:
> @{$aref2}[0] is 'sun'
ITYM:
${$aref2}[0] is 'sun'
--
Affijn, Ruud
"Gewoon is een tijger."
--
Ok everyone, I have thought about this one and tried various code changes but cannot get what I want.
My problem: redundant UIDs in password files.
My solution:
#1 store passwd files in a globbed array
#2 create array reference from globbed array
#3 open array ref, create hash with more than one value per key. Keys are regexps from filenames
#4 read in every line of passwd files from reference. Values in hash need to be passwd entries
For example: key => servernames.platform (dubhpr01.hpux)
values => filelds from passwd file (name,uid,gid,comments)
#5 Once hash is built, traverse through searching for usernames that have unlike UIDs from all files, then print these to an xls using SpreadSheet::WriteExcel.
In my code I have completed 1,2 and 3. Started 4 but I am printing the array reference address as opposed to printing the actual values. What am I doing wrong and any tips would be nice? thank you
_OUTPUT_
KEY dubhst14.hpux
ELEMENTS /home/dbsmith/passwd.dubhst14.hpux
DUB VALUES root
KEY dubhdv05.hpux
ELEMENTS /home/dbsmith/passwd.dubhdv05.hpux
DUB VALUES root
dubhst14.hpux => ARRAY(0x4002b0f8)
dubhdv05.hpux => ARRAY(0x4059c9a4)
dubhadm3.hpux => ARRAY(0x4059c8f0)
dwhetls2.hpux => ARRAY(0x4002c164)
dubhadm1.hpux => ARRAY(0x4059c8a8)
oftappp1.hpux => ARRAY(0x405a2084)
dubhpr28.hpux => ARRAY(0x4002e1bc)
cic2.hpux => ARRAY(0x4059c6f8)
#!/usr/bin/perl
##-- Initialize environment --##
use strict;
use warnings;
use diagnostics;
use Spreadsheet::WriteExcel;
#use Data::Dumper;
$ENV{"PATH"} = qq(/usr/bin:/bin:/home/dbsmith:/home/dbsmith/McGaw);
delete @ENV{qw (IFS CDPATH ENV KSH_ENV BASH_ENV)};
##-- Central DIE routine --##
open (LOG, ">>/tmp/uid_ck.log") or warn "uid_ck.log did not open $!";
my $overide = $SIG{__DIE__}; ## get error handler currently assigned 2 die
$SIG{__DIE__} = sub {
my $error = shift; ## error now holds the mesg passed to die
$overide->($error) if ( ref $overide );
print LOG ($error);
};
##-- BEGIN MAIN --##
my @dublinaray = glob("/home/dbsmith/passwd.*");
my $dublin_aref = \@dublinaray;
my @mcgawaray = glob("/home/dbsmith/McGaw/passwd.*");
my $mcgaw_aref = \@mcgawaray;
my (%dublin_hosts,%mcgaw_hosts) = ();
my ($dub_key,$dub_values,$mcg_key,$mcg_valu
es);
parse_file();
sub parse_file {
foreach my $element ( @{$dublin_aref} ) {
{ local *FILE;
open (FILE, "+<$element") or die "dublin reference did not open: $!";
local $/ = undef;
($dub_key) = $element =~ m|\.(\w+\.\w+)\z|i;
($dub_values) = split /:/, ;
push ( @{$dublin_hosts{$dub_key}}, $dub_values );
print "KEY\t",$dub_key,"\n\n";
print "ELEMENTS\t",$element,"\n\n";
print "DUB VALUES\t",$dub_values,"\n\n";
}
}
while ( ($dub_key,$dub_values) = each %dublin_hosts ) {
print "$dub_key => $dub_values\n";
}
#foreach my $host (sort keys %dublin_hosts) {
# print "$host: @{$dublin_hosts{$dub_key}}\n";
#}
#foreach my $element2 ( @{$mcgaw_aref} ) {
# { local *FILE2;
# open (FILE2, "+<$element2") or die "mcgaw reference did not open: $!";
# local $/ = undef;
# ($mcg_key) = $element2 =~ m|\.(\w+\.\w+)\z|i;
# push (@{$mcgaw_hosts{$mcg_key}}, $mcg_values );
# print "\n$element2\n\n";
# print ;
# }
#}
} ##-- END SUB --##
Incorrect problem statement. Should read
My Problem: unalike UIDs in password files for users. example joe.brown uid on server a is 1222 and uid on server b is 1198.
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
| |
| Oryann9 2006-12-15, 6:59 pm |
| oryann9 <oryann9@yahoo.com> wrote: oryann9 <oryann9@yahoo.com> wrote:
"Dr.Ruud" wrote: Lawrence Statton XE2/N1GAK schreef:
> @{$aref2}[0] is 'sun'
ITYM:
${$aref2}[0] is 'sun'
--
Affijn, Ruud
"Gewoon is een tijger."
--
Ok everyone, I have thought about this one and tried various code changes but cannot get what I want.
My problem: redundant UIDs in password files.
My solution:
#1 store passwd files in a globbed array
#2 create array reference from globbed array
#3 open array ref, create hash with more than one value per key. Keys are regexps from filenames
#4 read in every line of passwd files from reference. Values in hash need to be passwd entries
For example: key => servernames.platform (dubhpr01.hpux)
values => filelds from passwd file (name,uid,gid,comments)
#5 Once hash is built, traverse through searching for usernames that have unlike UIDs from all files, then print these to an xls using SpreadSheet::WriteExcel.
In my code I have completed 1,2 and 3. Started 4 but I am printing the array reference address as opposed to printing the actual values. What am I doing wrong and any tips would be nice? thank you
_OUTPUT_
KEY dubhst14.hpux
ELEMENTS /home/dbsmith/passwd.dubhst14.hpux
DUB VALUES root
KEY dubhdv05.hpux
ELEMENTS /home/dbsmith/passwd.dubhdv05.hpux
DUB VALUES root
dubhst14.hpux => ARRAY(0x4002b0f8)
dubhdv05.hpux => ARRAY(0x4059c9a4)
dubhadm3.hpux => ARRAY(0x4059c8f0)
dwhetls2.hpux => ARRAY(0x4002c164)
dubhadm1.hpux => ARRAY(0x4059c8a8)
oftappp1.hpux => ARRAY(0x405a2084)
dubhpr28.hpux => ARRAY(0x4002e1bc)
cic2.hpux => ARRAY(0x4059c6f8)
#!/usr/bin/perl
##-- Initialize environment --##
use strict;
use warnings;
use diagnostics;
use Spreadsheet::WriteExcel;
#use Data::Dumper;
$ENV{"PATH"} = qq(/usr/bin:/bin:/home/dbsmith:/home/dbsmith/McGaw);
delete @ENV{qw (IFS CDPATH ENV KSH_ENV BASH_ENV)};
##-- Central DIE routine --##
open (LOG, ">>/tmp/uid_ck.log") or warn "uid_ck.log did not open $!";
my $overide = $SIG{__DIE__}; ## get error handler currently assigned 2 die
$SIG{__DIE__} = sub {
my $error = shift; ## error now holds the mesg passed to die
$overide->($error) if ( ref $overide );
print LOG ($error);
};
##-- BEGIN MAIN --##
my @dublinaray = glob("/home/dbsmith/passwd.*");
my $dublin_aref = \@dublinaray;
my @mcgawaray = glob("/home/dbsmith/McGaw/passwd.*");
my $mcgaw_aref = \@mcgawaray;
my (%dublin_hosts,%mcgaw_hosts) = ();
my ($dub_key,$dub_values,$mcg_key,$mcg_valu
es);
parse_file();
sub parse_file {
foreach my $element ( @{$dublin_aref} ) {
{ local *FILE;
open (FILE, "+<$element") or die "dublin reference did not open: $!";
local $/ = undef;
($dub_key) = $element =~ m|\.(\w+\.\w+)\z|i;
($dub_values) = split /:/, <FILE>;
push ( @{$dublin_hosts{$dub_key}}, $dub_values );
print "KEY\t",$dub_key,"\n\n";
print "ELEMENTS\t",$element,"\n\n";
print "DUB VALUES\t",$dub_values,"\n\n";
}
}
while ( ($dub_key,$dub_values) = each %dublin_hosts ) {
print "$dub_key => $dub_values\n";
}
#foreach my $host (sort keys %dublin_hosts) {
# print "$host: @{$dublin_hosts{$dub_key}}\n";
#}
#foreach my $element2 ( @{$mcgaw_aref} ) {
# { local *FILE2;
# open (FILE2, "+<$element2") or die "mcgaw reference did not open: $!";
# local $/ = undef;
# ($mcg_key) = $element2 =~ m|\.(\w+\.\w+)\z|i;
# push (@{$mcgaw_hosts{$mcg_key}}, $mcg_values );
# print "\n$element2\n\n";
# print ;
# }
#}
} ##-- END SUB --##
Incorrect problem statement. Should read
My Problem: unalike UIDs in password files for users. example joe.brown uid on server a is 1222 and uid on server b is 1198.
________________________________________
__________
I looked in the cookbook and as I tried to implement is below. Am I on the right road?
5.7. Hashes with Multiple Values Per Key Problem You want to store more than one value for each key.
Solution Store an array reference in $hash{$key}, and put the values into that array.
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
|
|
|