in reply to Re: Parse one line of variables in multi-line tab delimited text file
in thread Parse one line of variables in multi-line tab delimited text file

This is REAL close, thank you.

Instead of "Bingo," though, I would like it to print out all of the variables on that line:

12345 date name email
  • Comment on Re^2: Parse one line of variables in multi-line tab delimited text file

Replies are listed 'Best First'.
Re^3: Parse one line of variables in multi-line tab delimited text file
by jerryran (Initiate) on Mar 17, 2011 at 19:58 UTC
    EUREKA!

    open (FILE, "<$ORDERS");
    while (<FILE>) {
    chomp;
    my @vals = split "\t";
    $order = $vals[0];
    $Date= $vals1;
    $name= $vals2;
    $email= $vals3;

    if ($vals[0] == $order) {
    print "$order";
    print "$Date";
    print "$name";
    print "$email";
    last;
    }

    }
    close (FILE);
    exit;

    THANK YOU!