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 SkipVought 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. ctbperlmonger

    Unknown Array

    They're hash references. Try this: #!/usr/bin/perl -w use strict; my $foo = { foo => 1, bar => 2 }; print $foo; You'll get funny numbers doing that too. It's just printing out HASH(memory_location) to tell you it's a reference (this is similar to pointers in C/C++ if you're familiar to...
  2. ctbperlmonger

    POSTing information to a webpage, AND going to the page

    Not sure I'm clear on this question, but why not just redirect to the URL and pass the data as part of it? For example (using the CGI module, of course): print $cgi->redirect('somepage.html?var1=val1&var2=val2');
  3. ctbperlmonger

    Regex

    #1: It's implemented easiest with () grouping, not [] character class: $foo =~ /(minute)|(hour)|(day)s? ago/; #2: You can match the message using character classes [ ] because ( and ) aren't interepreted as anything but their characters within character classes. For example: [\w()\s]+...
  4. ctbperlmonger

    Newbie needs help with QueryString

    Are you asking a Perl or a PHP question? If you're asking a Perl question, the easiest way to get it would be using the CGI module and giving the file the proper bang line (#!/path/to/perl -w) and extension.. use CGI; my $cgi = new CGI; my $query_value = $cgi->param('artist_id'); Voila...
  5. ctbperlmonger

    hash tables

    #!/usr/bin/perl -w use strict; my $foo = { 'key1' => [{'keya' => 'a'}, {'keyb' => 'b'}], 'key2' => [{'keyc' => 'c'}, {'keyd' => 'd'}], }; foreach my $item(@{$foo->{'key2'}}) { while(my ($key, $val) = each %{$item}) { print "$val "; } } print...

Part and Inventory Search

Back
Top