Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    I don't see where this faulty print out can come from. Please copy and paste the full script.
  2. #17
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    10
    Rep Power
    0
    Can you send me at jo_quebec.hotmail.com
  4. #18
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    Allright, your logic is wrong.

    instead of having:

    Code:
    if ($. == 1) {
    print $FIC $_, ", Total, Literal, Mention \n"; # prints input line + additional fields
    }
    else {
    @ligne = split(",",$_);
    
    $note = $ligne[2]+$ligne[3]+$ligne[4]+$ligne[5];
    }
    you should have:

    Code:
    if ($. == 1) {
    print $FIC $_, ", Total, Literal, Mention \n"; # prints input line + additional fields
    }
    else {
    @ligne = split(",",$_);
    
    $note = $ligne[2]+$ligne[3]+$ligne[4]+$ligne[5];
    # almost all of the rest of your program should be in this else clause,
    #only the close file statements should appear after the closing curly brace.
    }
  6. #19
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    10
    Rep Power
    0
    Thank you veru much sir Laurent
    you helped me to achieve this task.
    now my code works propley.
    You are a very nice person
    Yours
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo