Put a variable in the report header : Variable « Report « Perl






Put a variable in the report header

   

    #!/usr/local/bin/perl -w

    use English;

    while (<ARGV>)
    {
        chomp;
        ($number,$type,$name,$price,$desc) = split (/\|/);
        write;
    }

    format STDOUT_TOP=
    Count Item #  Item Type  Item Name      Price     Description   Page @>>>>>>
    $FORMAT_PAGE_NUMBER
    ------------------------------------------------------------------------------

    .

    format STDOUT=
    @>>>> @|||||| @<<<<<<<<< @<<<<<<<<<<<<< $@####.##
    ^<<<<<<<<<<<<<<<<<<<<<<<<<
    $.,$number,$type,$name,$price,$desc
    ~^<<<<<<<<<<<<<<<<<<<<<<<<<
    $desc
    ~^<<<<<<<<<<<<<<<<<<<<<<<<<
    $desc

    .

   
    
    
  








Related examples in the same category

1.Passing one variable with ! inside to format
2.Prints a value-field character.
3.Separate the variables with commas to put multiple data fields on the same line
4.Passing value to the format