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

  • Users: carg1
  • Order by date
  1. carg1

    Uninitialized value message

    In a script I'm working on, I'm using this block of code to convert a file's Date Modified as the filename for the output file: #Ops stores the stat function ran on the previous input. $Ops = (stat($DB))[9]; #Converts the date to a readable format ($sec, $min, $hour, $mday, $mon, $year, $wday...
  2. carg1

    Matching

    Actually, if I tell it to use if (exists $Dest) it tells me that it's not part of a hash or array. duncdude's matching expression works exactly as I need it to. The thing is, when it counts, I infer that it's telling me every individual instance of an address instead of how many times it was...
  3. carg1

    Matching

    I'm sorry, I'm pretty much new at Perl, I've only been at it for about 2 weeks. my %IPs; #Added in this HASH my $User; my $Dd; my $Tt; my $Ap; my $Dest; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); #my $Choices; #my $PickNumber; print "Which file: "; $TheDB =...
  4. carg1

    Matching

    Sorry for the linguistic confusion, I really meant substituting. Oh and that $key =~ s/http:\/\/*.*\///ig; line was an early, unsuccessful attempt that I forgot to delete. Also, I just tried your first method again, I was implementing it wrong before. It sort of worked. On some of the URLs...
  5. carg1

    Matching

    I'm afraid it didn't work, raklet.
  6. carg1

    Matching

    Hello everyone. I have this code, originally courtesy of FireMyst, and I modified it. Originally it counted instances of user IP addresses from the records in log files. Now I want to get the addresses the users visited. I've got it pulling out the addresses and counting them, but I don't...
  7. carg1

    Counting iterations of a loop

    Worked like a charm! Thanks!
  8. carg1

    Counting iterations of a loop

    It does come out to be some rather ungainly code. Just to make things clear, I don't want it to generate the sixth option. I'm just doing it in a subroutine: sub input2{ my $Choices2; my $Picknumber2; INPUT2: $Choices2 = <<'OPTIONS2'; Hey again! What would you like to do next? 1) Open...
  9. carg1

    Counting iterations of a loop

    Hello everyone. What I want to do is go through a loop, and when it has gone through that loop one or more times, I want it to run a subroutine. The code I have so far is this: print &quot;\n\nPlease enter the name of the file to load: &quot;; $DB = <STDIN>; chomp($DB); INPUT: $Choices =...
  10. carg1

    Problem with a time hash

    Oookay, I see I was far overstepping my knowledge. Here's my original goals in pseudocode: Ask which file you want to run time calculations on Open that file Begin an infinite loop Associate the user with the time Associate the time with the site Calculate the time since the epoch of the first...
  11. carg1

    Problem with a time hash

    Okay so I'm still wrestling with these log files. What I'm trying to do now is get it to go through and add up how long a user stayed on a page. The log is formatted like this: 19.33.44.63 2003/08/05 0009:38:11 PASSED http://www.slashdot.com 110.25.12.6 2003/08/05 0009:38:11 PASSED...
  12. carg1

    Epoch time setting

    Oh, wait, usige you just gave me a thought. If I had it add that date to the epoch and use that as a starting point instead of trying to change the epoch itself, that should work, right?
  13. carg1

    Epoch time setting

    Yes, I want to set the epoch to the first date/time combo in a list, for example: 08/13/03 06:17:29 08/17/03 12:22:04 08/17/03 18:19:20 I would want the epoch to be set as 08/13/03 06:17:29. Unfortunately Duncan, I'm doing it in Windows, I'm sorry I failed to mention that. Is there a...
  14. carg1

    Epoch time setting

    If I had a list that had times in it, and I wanted to set the epoch to the first time in that list, how would I pull that off?
  15. carg1

    Text parsing question

    Actually I got it working with the curly bracket, either way, works like a charm, and you have my gratitude and a star, hehe:-)
  16. carg1

    Text parsing question

    oh, it was just a missing curly bracket
  17. carg1

    Text parsing question

    duncdude, it doesn't actually print anything to the screen but I can definitely study that and get some direction from it, thanks! Firemyst, it says there's a syntax error on the line &quot;foreach $key (sort keys %IPs) { #Print out each key&quot; but I'm gonna look into it and see if I can...
  18. carg1

    Text parsing question

    Well I'm convinced I'm using the split function wrong if my output is anything to go by. What I want to do is take lines formed exactly like the following (with the exception that there's multiple spaces between the columns in the real thing): 10.1.3.4 08/13/2003 14:18:30 PASSED...
  19. carg1

    Wrong time returned by stat function

    Wow! Works like a charm! Thanks Tony!
  20. carg1

    Wrong time returned by stat function

    I don't understand this problem. This script is meant to read a text file from a content filter and let you query it by any text input. For some reason, it won't return the right date modified date in the section where I ask it to call for it. I want to use that as part of the filename when it...

Part and Inventory Search

Back
Top