printf has the f on the end because it expects a format string.  If you
are on a unix box try typing  "man 3 printf".  This shows you the docs
for C's printf, but since perl's printf is does a straight pass thorugh
to C's printf that shouldn't matter.  Try this in your code:

printf sortcode "%s %s %s %s\n", $fields[0], $fields[5], $fields[70],
fields[77];

The big question I have is "why are you using printf?"  Printf should
only used when you care very much about how the output is formated (ie
printing only two decimal places on a number).

<snip href="perldoc -f printf">
              Don't fall into the trap of using a "printf" when
              a simple "print" would do.  The "print" is more
              efficient and less error prone.
</snip>

On 27 Jun 2001 13:11:46 +0100, Govinderjit Dhinsa wrote:
> I can not get the printf to print, using the following relevant line of
> code:
> printf sortcode $fields[0],$fields[5],$fields[70],fields[77];
> 
> I am missing something in-between;
> sortcode *********************$fields[0]
> 
> I have tried different things but had no luck!
> 
> PS Your help would be much appreciated.
> 
> Thanks,
> GD
> 
> 
> 
> 
> 
--
Today is Pungenday, the 32nd day of Confusion in the YOLD 3167
Frink!

Reply via email to