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 strongm 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: *

  • Users: Grahf
  • Order by date
  1. Grahf

    opening two filehandles with same filehandle name

    Not sure what will happen, but what's the harm in just including the line close LOGFILE; at the end of your loop?
  2. Grahf

    code troubleshooting

    Just as a little question (I'm not gonna bother starting a new thread), is there any way to get CGI::Carp to give more useful error messages? When I do not include the line and examine the log file, it gives the error message and the line number. But CGI::Carp just reports the extremely...
  3. Grahf

    file isn't being written to...should incredment by 1 w/ conditions met

    I think the problem is that you used 'my' with $counter twice. I think that saying my $counter += 1 will overwrite the previous value, giving the variable just a value of 1.
  4. Grahf

    Need to replace a file extension

    Sorry, I actually made a mistake. The period is a wildcard for ANY character. So if you want a physical period, then escape it: s/\.tga/\.gif/ Sorry for forgetting that ;)
  5. Grahf

    Need to replace a file extension

    Use the s/ regex, not the tr/ one. I'm pretty sure that your tr/ regexp will do this: *Replace all periods with a period (no change) *replace all t's with g's *Replace all g's with i's *Replace all a's wth f's. The s/ one will work fine.
  6. Grahf

    multiple require "script.pl" files...

    Just add more requires... #!/usr/bin/perl require "cards3.pl"; require "cards4.pl"; require "cards5.pl";
  7. Grahf

    Permissions Confusion

    If you don't want anyone to be able to look at your file from the web browser, use the extension .cgi or .pl instead of .txt It won't be a real CGI or Perl file, but browsers won't read it as they would a text file. Your script will read it the same way as the text file.
  8. Grahf

    how to make an if statement to check multiple variables

    If you want to make sure that all of them are real email addresses, try this: Assuming the email addresses are stored in @EmailAddresses, do this: for $i (0 .. 4) { print "Entry number $i is not an email address!" if ($EmailAddresses[$i] !~ /[\w\.-]+\@[\w-]+\.\w{2,}/); }
  9. Grahf

    Split function

    Or maybe the perl location is #!/usr/local/bin/perl
  10. Grahf

    script

    Shouldn't this: for ( $i = 0; $i < @a; ++$i ) { be this? for ( $i = 0; $i < $#a; ++$i ) {
  11. Grahf

    cookie

    Although I don't know of a solution to your problem, the above solution would reload the page in 5 minutes whether the computer was idle or not, wouldn't it?
  12. Grahf

    if statement to check if file is empty?

    If you want to check whether the file exists, you would use -e, wouldn't you? -z returns true if the file exists but is zero-size. I could be wrong, though. But I always use -e to see if the file exists.

Part and Inventory Search

Back
Top