Loading ...
Sorry, an error occurred while loading the content.

[PBML] Re: letters

Expand Messages
  • Smith, Eric - WPAFB/YSXOI
    You can use the GD module for this. If you really want to get fancy, you could use the Image::Magick module along with the ImageMagick program. GD should be
    Message 1 of 4 , Dec 8, 1999
    • 0 Attachment
      You can use the GD module for this. If you really want to get fancy, you
      could use the Image::Magick module along with the ImageMagick program.

      GD should be in your Perl distribution. You can get the latest (now uses
      PNG instead of GIF) as well as the Image::Magick module from CPAN
      (http://www.cpan.org). Should be a link there to the ImageMagick site.

      > - Eric D. Smith - Webmaster
      > B-2 Program Office - (937) 656-5256
      > mailto:eric.smith@...
      > B-2 Web Support - mailto:webmaster@...
      Real men use Perl;

      > -----Original Message-----
      > From: james@... [SMTP:james@...]
      > Sent: Wednesday, December 08, 1999 12:56 PM
      > To: perl-beginner@egroups.com
      > Subject: [PBML] letters
      >
      > Hi,
      >
      > I am thinking of creating a script whereby the user enters their
      > name, then the script takes each letter of their name and displays
      > a graphic e.g. if 'james' was entered, it would display a 'j' graphic
      > then a 'a' graphic, then a 'm' graphic etc....
      >
      > How do you do this is perl?
      >
      > James
      >
      > :: James Fox
      > :: DJ Associates
      > :: Tel: +44 (0)114 2210525
      > :: Fax: +44 (0)114 2493450
      >
      >
      > ------------------------------------------------------------------------
      > Was the salesman clueless? Productopia has the answers.
      > http://clickhere.egroups.com/click/1702
      >
      >
      >
      > -- Create a poll/survey for your group!
      > -- http://www.egroups.com/vote?listname=perl-beginner&m=1
      >
      >
    • Ahrendt, Robert
      sorry here s the script #!/usr/bin/perl #assuming $name is the variable that holds the name to be changed #to a graphic also assumes this is in the middle of a
      Message 2 of 4 , Dec 8, 1999
      • 0 Attachment
        sorry here's the script
        #!/usr/bin/perl
        #assuming $name is the variable that holds the name to be changed
        #to a graphic also assumes this is in the middle of a cgi script#
        $name=lc($name);
        %alpha_graphics = ("a" => "a.gif",
        "b" => "b.gif",
        "c" => "c.gif",
        "d" => "d.gif",
        "e" => "e.gif",
        #fill in rest
        )
        $i= length($name);
        for ($j=0;$j<$i;$j++){
        $temp= substr ($name,$j ,1) ;
        @full_name=();
        push(@full_name,$alpha_graphics[$temp]);
        }
        print qq~
        <TABLE>
        <TR>
        <TD>~;
        for($a=0;$a<$#full_name;$a++){
        print qq~<IMG SRC="$full_name[$a]">~;
        }
        print qq~
        </TD>
        </TR>
        </TABLE>~;
        #end of scriptlet

        > ----------
        > From: Ahrendt, Robert[SMTP:RAHRENDT@...]
        > Reply To: perl-beginner@egroups.com
        > Sent: Wednesday, December 08, 1999 1:45 PM
        > To: 'perl-beginner@egroups.com'
        > Subject: [PBML] Re: letters
        >
        > I'm sure there is a better way to do this, but here is what I came up with
        > it assumes you have parsed $name and it's in a cgi environment(printing
        > out
        > the graphics in html). I didn't debug it, I thought that this would give
        > you
        > an idea of where you want to go from here. Becareful I get dislexic when
        > I'm
        > in a hurry.
        > -Robert
        >
        > > ----------
        > > From: james@...[SMTP:james@...]
        > > Reply To: perl-beginner@egroups.com
        > > Sent: Wednesday, December 08, 1999 12:55 PM
        > > To: perl-beginner@egroups.com
        > > Subject: [PBML] letters
        > >
        > > Hi,
        > >
        > > I am thinking of creating a script whereby the user enters their
        > > name, then the script takes each letter of their name and displays
        > > a graphic e.g. if 'james' was entered, it would display a 'j' graphic
        > > then a 'a' graphic, then a 'm' graphic etc....
        > >
        > > How do you do this is perl?
        > >
        > > James
        > >
        > > :: James Fox
        > > :: DJ Associates
        > > :: Tel: +44 (0)114 2210525
        > > :: Fax: +44 (0)114 2493450
        > >
        > >
        > > ------------------------------------------------------------------------
        > > Was the salesman clueless? Productopia has the answers.
        > > http://clickhere.egroups.com/click/1702
        > >
        > >
        > >
        > > -- Create a poll/survey for your group!
        > > -- http://www.egroups.com/vote?listname=perl-beginner&m=1
        > >
        > >
        >
        > ------------------------------------------------------------------------
        > Was the salesman clueless? Productopia has the answers.
        > http://clickhere.egroups.com/click/1702
        >
        >
        >
        > eGroups.com Home: http://www.egroups.com/group/perl-beginner/
        > http://www.egroups.com - Simplifying group communications
        >
        >
      • Greg Webster
        That seems a little overkill...make 26 gifs called a.gif, b.gif, etc. ... $name = greg ; @letters = split(//, $name); foreach $letter (@letters) { $filename =
        Message 3 of 4 , Dec 8, 1999
        • 0 Attachment
          That seems a little overkill...make 26 gifs called a.gif, b.gif, etc.
          ---
          $name = "greg";

          @letters = split(//, $name);

          foreach $letter (@letters)
          {
          $filename = $letter . ".gif";
          print "<img src=\"$filename\">";
          }
          ---
          Greg



          On Wed, 08 Dec 1999, you formulated thoughtfully:
          > You can use the GD module for this. If you really want to get fancy, you
          > could use the Image::Magick module along with the ImageMagick program.
          >
          > GD should be in your Perl distribution. You can get the latest (now uses
          > PNG instead of GIF) as well as the Image::Magick module from CPAN
          > (http://www.cpan.org). Should be a link there to the ImageMagick site.
          >
          > > - Eric D. Smith - Webmaster
          > > B-2 Program Office - (937) 656-5256
          > > mailto:eric.smith@...
          > > B-2 Web Support - mailto:webmaster@...
          > Real men use Perl;
          >
          > > -----Original Message-----
          > > From: james@... [SMTP:james@...]
          > > Sent: Wednesday, December 08, 1999 12:56 PM
          > > To: perl-beginner@egroups.com
          > > Subject: [PBML] letters
          > >
          > > Hi,
          > >
          > > I am thinking of creating a script whereby the user enters their
          > > name, then the script takes each letter of their name and displays
          > > a graphic e.g. if 'james' was entered, it would display a 'j' graphic
          > > then a 'a' graphic, then a 'm' graphic etc....
          > >
          > > How do you do this is perl?
          > >
          > > James
          > >
          > > :: James Fox
          > > :: DJ Associates
          > > :: Tel: +44 (0)114 2210525
          > > :: Fax: +44 (0)114 2493450
          > >
          > >
          > > ------------------------------------------------------------------------
          > > Was the salesman clueless? Productopia has the answers.
          > > http://clickhere.egroups.com/click/1702
          > >
          > >
          > >
          > > -- Create a poll/survey for your group!
          > > -- http://www.egroups.com/vote?listname=perl-beginner&m=1
          > >
          > >
          >
          > ------------------------------------------------------------------------
          > Was the salesman clueless? Productopia has the answers.
          > http://clickhere.egroups.com/click/1702
          >
          >
          >
          > -- Easily schedule meetings and events using the group calendar!
          > -- http://www.egroups.com/cal?listname=perl-beginner&m=1
          --
          Greg Webster
          http://www.geekrights.org
          Power to the precocious!
        Your message has been successfully submitted and would be delivered to recipients shortly.