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 Mike Lewis 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. ickypick

    Handle White Space in File Path

    No, no, as I said I AM using the samples as the data to test. Anyways I figured out the problem. I pasted your code: while (<FILE>) { chomp; my @temp = split(/\s+/); my @data = (splice(@temp, 0, 7), undef, splice(@temp, -9))...
  2. ickypick

    Handle White Space in File Path

    I agree guys, the sample code posted worked fine. The data is the same, because I created a test data file with only one entry in it: myhost# ./test.pl -d test reading file /home/test/ftplogs/archive/test/ftp.log Use of uninitialized value in string eq at ./test.pl line 109, <FILE> line 1...
  3. ickypick

    Handle White Space in File Path

    Hi Kevin, Thanks for all the help BTW. :) For some reason the $size variable is not getting populated. I get an error saying : "Use of uninitialized value in string eq at ./test.pl line 109, <FILE> line 1" This is line 109 : unless ($size eq "-" || $duration eq "-") { $duration sems to be...
  4. ickypick

    Handle White Space in File Path

    How would I put this splice into my while statement? # OPEN LOG FILE DIRECTORY # ----------------------- opendir(DIR, "$archive_dir/$dir") or die "Can't open $archive_dir/$dir: $!"; while (defined ($file = readdir DIR)) { next unless $file =~ /^ftp.log/; print "reading file...
  5. ickypick

    Handle White Space in File Path

    The file extension could be anything, or perhaps no extension at all. All the fields are always populated. So there will be eight fields before the file name and nine after. Does that help? Thanks, Icky
  6. ickypick

    Handle White Space in File Path

    A little more information: A log entry may look like this - Mon Oct 2 11:20:10 2006 23 192.168.0.1 87269520 /xyz2_00HR_ASD_70804_1_86GB_3ABC/1_SPACE IN_FILE_PATH/70804123401.45210221.865760.tar b _ o r janedoe ftp 0 * c the next entry may be this - Mon Oct 2 11:22:10 2006 23 192.168.0.3...
  7. ickypick

    Handle White Space in File Path

    Thanks Paul, How would I stick this in my loop? while (<FILE>) { ($dow, $month, $day, $time, $year, $duration, $clientip, $size, $path, $ttype, $specialact, $type, $mode, $uid, $service, $authm, $authu, $st atus) = split(/\s+/); Icky
  8. ickypick

    Handle White Space in File Path

    Hi All, I have a parser that reads in ftp logs and does an insert into a database. Everything parses, and inserts fine. However, on occasion, a user has created a file or file path with whitespace in the name, i.e. - "/userhome/my files/bigfile". The parser picks up the whitespace between "my...
  9. ickypick

    Multiple if's in sngle log file read in loop --Help

    I am writing a parser to read in ftp log files and insert into a databse. I have everything working fine, except the legacy billing system being used generates bills for each user instead of the master account. Therefore, as a bandaid, I need to attach an account field to each uid for each...

Part and Inventory Search

Back
Top