"Fossies" - the Fresh Open Source Software Archive

Member "fly-2.0.1/examples/perl/perl.example" (25 Nov 2001, 708 Bytes) of package /linux/www/old/fly-2.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/local/bin/perl
    2 
    3 $flyprog = "../fly";
    4 $outfile = "temp.gif";
    5 
    6 $infile = "/tmp/fly.$$";
    7 
    8 open(FLY,"> $infile");
    9 print FLY "new\n";
   10 print FLY "size 256,256\n";
   11 print FLY "fill 1,1,255,255,255\n";
   12 print FLY "circle 128,128,180,0,0,0\n";
   13 print FLY "fill 128,128,255,255,0\n";
   14 print FLY "arc 128,128,120,120,0,180,0,0,0\n";
   15 print FLY "circle 96,96,10,0,0,0\n";
   16 print FLY "circle 160,96,10,0,0,0\n";
   17 print FLY "fill 96,96,0,0,0\n";
   18 print FLY "fill 160,96,0,0,0\n";
   19 print FLY "string 0,0,0,10,240,giant,Hello, World!\n";
   20 print FLY "string 0,0,0,100,10,medium,Don't worry, be Happy!\n";
   21 
   22 close(FLY);
   23 
   24 open(FOO,"$flyprog -i $infile -o $outfile |");
   25 while( <FOO> ) {print;}
   26 close(FOO);