#!/usr/bin/perl -w use strict; my $count = 0; while ( $count < 42 ) { # Draw pole print( ' ', '+', ' ' ) if ( $count == 0 ); print( '|', ' ', '|' ) if ($count); # Draw lanyard print(' ') if ( ( $count > 5 ) and ( $count < 40 ) ); print(' ') if ( ( $count > 20 ) and ( $count < 39 ) ); print('\\') if ( ( $count == 5 ) or ( $count == 21 ) ); print('|') if ( ( $count == 22 ) or ( ( $count > 36 ) and ( $count < 39 ) ) ); print('/') if ( $count == 39 ); # Draw US flag (which would normally start at 2) print( '+', '-' x 59, '+' ) if ( ( $count == 6 ) or ( $count == 20 ) or ( $count == 23 ) or ( $count == 36 ) ); print( '|', ' *' x 6, ' ', '#' x 46, '|' ) if ( ( $count > 6 ) and ( $count < 15 ) and ( $count % 2 ) ); print( '|', ' ' x 2, '* ' x 5, ' |', ' ' x 45, '|' ) if ( ( $count > 6 ) and ( $count < 15 ) and ( !( $count % 2 ) ) ); print( '|', ( $count % 2 ? '#' : ' ' ) x 59, '|' ) if ( ( $count > 14 ) and ( $count < 20 ) ); # Draw TX flag print( '|', ' ' x 7 ) if ( ( $count > 23 ) and ( $count < 36 ) ); print(' ') if ( ( $count != 29 ) and ( $count > 26 ) and ( $count < 32 ) ); print( ' ' x ( 29 - $count ) ) if ( ( $count > 26 ) and ( $count < 29 ) ); print('*') if ( $count == 29 ); print( '*' x ( ( $count - 27 ) * 2 + 1 ) ) if ( ( $count > 26 ) and ( $count < 30 ) ); print('*') if ( $count == 29 ); print( ( $count % 2 ? '*' : ' ' ), ( $count % 2 ? ' ' : '*' ) x 3, ( $count % 2 ? '*' : ' ' ) ) if ( ( $count > 29 ) and ( $count < 32 ) ); print( ' ' x ( 29 - $count ) ) if ( ( $count > 26 ) and ( $count < 30 ) ); print(' ') if ( ( $count != 29 ) and ( $count > 26 ) and ( $count < 32 ) ); print( ' ' x 5 ) if ( ( ( $count > 23 ) and ( $count < 27 ) ) or ( ( $count > 31 ) and ( $count < 36 ) ) ); print( ' ' x 5 ) if ( ( ( $count > 23 ) and ( $count < 27 ) ) or ( ( $count > 31 ) and ( $count < 36 ) ) ); print( ' ' x 3 ) if ( ( $count > 26 ) and ( $count < 32 ) ); print( ' ' x 3 ) if ( ( $count > 23 ) and ( $count < 36 ) ); print( ( $count < 30 ? '|' : '#' ), ( $count < 30 ? ' ' : '#' ) x 38, '|' ) if ( ( $count > 23 ) and ( $count < 36 ) ); print("\n"); $count++; }