4 Replies - 877 Views - Last Post: 13 August 2010 - 01:53 AM

#1 jbeme  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 93
  • Joined: 30-October 09

Can perl be embedded in html to show picture

Posted 05 August 2010 - 11:05 PM

Can you query a param() for a picture and then use that to show the picture in html using perl? I want to know is if this is all possible client side. Yeah hope that makes sense.
I have one other question, are there any problems with the client pc running perl modules(right word?). I have no experience using perl in this way.
Is This A Good Question/Topic? 0
  • +

Replies To: Can perl be embedded in html to show picture

#2 b0ng01  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 38
  • View blog
  • Posts: 169
  • Joined: 16-July 10

Re: Can perl be embedded in html to show picture

Posted 06 August 2010 - 04:59 PM

Do you mean can you create a client application that queries a database and then searches through the code for an image and then downloads that image from the server? Short answer yes. Long answer there are other better tools to do that. But, for Perl use Image::Grab extension

This post has been edited by b0ng01: 06 August 2010 - 05:04 PM

Was This Post Helpful? 0
  • +
  • -

#3 dsherohman  Icon User is offline

  • Perl Parson
  • member icon

Reputation: 226
  • View blog
  • Posts: 654
  • Joined: 29-March 09

Re: Can perl be embedded in html to show picture

Posted 12 August 2010 - 10:16 AM

View Postjbeme, on 06 August 2010 - 06:05 AM, said:

Can you query a param() for a picture and then use that to show the picture in html using perl? I want to know is if this is all possible client side. Yeah hope that makes sense.


Yes and no.

Yes, it is possible to build a web site which does this and uses Perl to provide the files (image and otherwise) on the server side.

No, it is not possible to do this in Perl on the client side, because browsers do not, as a rule, execute Perl code. Unless you're using a plugin, Javascript is pretty much the only game in town when it comes to client-side code for web sites.

If you want to do this using a minimal amount of Javascript and push as much of the work as possible onto server-side Perl code, take a look at CGI::Ajax for the easiest way to accomplish this.

View Postjbeme, on 06 August 2010 - 06:05 AM, said:

I have one other question, are there any problems with the client pc running perl modules(right word?). I have no experience using perl in this way.


Yes, "modules" is the right word, but, since you can't run Perl code in the user's browser, this isn't really relevant unless I've misunderstood and you want to write a Perl desktop app rather than something browser-based.
Was This Post Helpful? 2
  • +
  • -

#4 jbeme  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 93
  • Joined: 30-October 09

Re: Can perl be embedded in html to show picture

Posted 12 August 2010 - 08:39 PM

I thought as much. Pretty much self taught, so its hard for me to find out capabilities without asking. I have always used perl/c to deal with files. So guess its time to hone up on my Java again.
Was This Post Helpful? 0
  • +
  • -

#5 dsherohman  Icon User is offline

  • Perl Parson
  • member icon

Reputation: 226
  • View blog
  • Posts: 654
  • Joined: 29-March 09

Re: Can perl be embedded in html to show picture

Posted 13 August 2010 - 01:53 AM

View Postjbeme, on 13 August 2010 - 03:39 AM, said:

So guess its time to hone up on my Java again.

Do note that Java and Javascript are completely separate languages which just happen to have similar names...

(Although you can run Java applets in any browser with a (compatible) JVM plugin, so you may have actually meant Java, but I suspect Javascript is what you'd actually want for this.)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1