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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by CharlesClarkson

  1. CharlesClarkson

    trying to turn my hashes into strings

    Dark Reaper, NOTE for inexperienced programmers: This thread uses symbolic references. Symbolic references are frowned upon by many programmers. Inexperienced programmers should avoid the use of symbolic references. It would be faster to call dehash with a reference: dehash( $hit[1] ); sub...
  2. CharlesClarkson

    Perl for Lamers?

    Try this one. It is written by a programmer, but it is clear and teaches secure CGI programming practices. http://www.easystreet.com/~ovid/cgi_course/index.html HTH, Charles
  3. CharlesClarkson

    for each statement help needed

    Rob, You haven't loaded CGI.pm: #!/usr/bin/perl use strict; use warnings; use diagnostics; use CGI::Carp 'fatalsToBrowser'; $req = new CGI; Should be: #!/usr/bin/perl use strict; use warnings; use diagnostics; use CGI::Carp 'fatalsToBrowser'; use CGI; $req = new CGI; Do you have a...
  4. CharlesClarkson

    for each statement help needed

    Rob, I didn't mean to make you feel dumb. Please remember that many of us were new to programming at one time. The subroutines can go anywhere you want, but are traditionally placed at the end of the program below the last line of code in the main program. HTH, Charles
  5. CharlesClarkson

    for each statement help needed

    Rob, This is the second time you have listed the source without the subroutines. Did you put the two sub routines in your program? If you were using strict you would have caught this error immediately! Here are the subs again: sub artist_table { # # $name the artists name...
  6. CharlesClarkson

    for each statement help needed

    Rob, First, a point on security. Never post actual file paths to a public forum. Change them to something innocuous like: data.log. Second, start all your web scripts with: #!/usr/bin/perl use strict; use warnings; use diagnostics; use CGI::Carp 'fatalsToBrowser'; If use warnings gives an...
  7. CharlesClarkson

    for each statement help needed

    It sounds like you need a hash. A hash is like an array but the indexes can be names and you an't count on the order. Before we go much farther let me show a shortcut to getting information from the file. Since we only need $id, $artist, and $title, ($id, $simage, $bimage, $artist...
  8. CharlesClarkson

    Reverse the contents of a variable

    Neversleep, it fails on 'Hello'. Or any odd length string. How about something with customisable grouping? print group_reverse( 'How are you?', 2 ); sub group_reverse { # reverse a string by character grouping # omit or set second argument to 0 to reverse entire string. # group_reverse(...

Part and Inventory Search

Back
Top