Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ryagatich

    DBI and Select *

    So what if you do this: my @storedData; while (my $row = $sth->fetchrow_hashref) { push(@storedData, $row); } $sth->finish; # blah blah, more stuff foreach my $storedRow (@storedData) { print $storedRow->{'supplier_name'}; }
  2. ryagatich

    add string at end of line perl

    Since it's a perl forum, and not a sed forum. Here is a possible way to do it for other readers coming around. #!/usr/bin/perl -w use IO::File; my $fh = IO::File->new('ips.txt','r'); die 'ips.txt: ' . $! unless($fh && $fh->opened); while (my $line = $fh->getline) { chomp($line); print...
  3. ryagatich

    Net::SSH::Expect question

    Although I'm not familiar with Net::SSH::Expect, I am familiar (and use) Net::SSH::Perl: my $ssh = Net::SSH::Perl->new('server'); $ssh->login('user','pass'); my ($o, $e, $x) = $ssh->cmd('ls -al /tmp'); print STDOUT "STDOUT was: " . $o . "\n"; print STDERR "STDERR was: " . $e . "\n"; print "exit...
  4. ryagatich

    DBI and Select *

    When you want to access a hash reference, you can access it in the following manner: $row->{name} Accessing your data via $row['name'] isn't really productive here. But, if you want $row{'name'} instead (or $row{name} for those of us lazy people), you can dereference the hash by doing: my %row...
  5. ryagatich

    File::Copy won't copy *.h files

    The problem you have is really in your code, not File::Copy; Example: <quote> [ryagatich@nemesis ~/code/copy]$ find . ./src ./src/test1.c ./src/test1.h ./dst ./copy.pl [ryagatich@nemesis ~/code/copy]$ perl copy.pl [ryagatich@nemesis ~/code/copy]$ find . ./src ./src/test1.c ./src/test1.h ./dst...

Part and Inventory Search

Back
Top