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 Chriss Miller 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. DazzerTperl

    How do I name variables after a list?

    Thanks again MillerH - ignore my previous question - I wasn't reading the db I thought I was - duh! I've got it to work - it's still a bit long hand. How can I replace "name" below with columns[0] in: @{$table[$indexOfColumn{name}]} I guess that involves a radical rewrite. It's just so I can...
  2. DazzerTperl

    How do I name variables after a list?

    Thanks, MillerH, I've got your code working but it'll only print column data [title] for column one [name] and column four [col_four] for column two [location] - very odd. It must be double counting somewhere but I can't see where.
  3. DazzerTperl

    How do I name variables after a list?

    MillerH I've tried using your code but oddly I get the error 'Can't locate object method "fetchrow_array" via package "DBI::db"' Have I forgetten to define something? Or do I need another package for DBI? Dazzer
  4. DazzerTperl

    How do I name variables after a list?

    thanks I see your point now - the steer and advice is much appreciated. I must really get my head round multidimensional arrays with keys! Dazzer
  5. DazzerTperl

    How do I name variables after a list?

    Thanks Miller, that looks extremely useful, but I'm not sure I explained myself clearly. I'm sure there's a way to scroll through an array $i=0; foreach (@array) { $new_array_{$i}[$j] =$array[$i]; $i++; } where the variable $new_array_{$i}[$j] becomes $new_array_7[$j] if $i=7; I'm trying to...
  6. DazzerTperl

    How do I name variables after a list?

    I have a list of variables in an array and I want to effectively create an array for each of these named headings. ie list is say name, title, location and I want to call the variable array $[name][$i], $[location][$i], $[title][$i], and fill them via a loop $[name][$i]=whatever. I know its...
  7. DazzerTperl

    Windows ActivePerl and mySQL

    Previously I've used ActivePerl on Linux where the modules came installed I recall. The MySQL site says I have to install DBI and DBD for perl to talk to the mysql server. But there seems to be DBI and DBD already in the bin from the default ActivePerl install. So first, do I need to install...

Part and Inventory Search

Back
Top