dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: Sixtease

Page 1 of 16 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    10
    Views
    2,023

    use strict; use warnings; use CGI::Carp...

    use strict;
    use warnings;
    use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
    print "Content-type: text/html\n\n";
    my $pt="1";
    my $num="3";
    my $rows="2"; ## number of table rows to show
    ...
  2. Replies
    10
    Views
    2,023

    Try to increment at the end of the block

    Try to increment at the end of the block
  3. Replies
    10
    Views
    2,023

    How about you print new row when you had enough...

    How about you print new row when you had enough records processed? Like
    print '</tr><tr>' if $start % $ltp == 0

    Sorry cannot write a decent example as I am on a phone.
  4. Replies
    10
    Views
    2,023

    Instead of , try to say . Please...

    Instead of </td><td>, try to say <br />. Please note that this is not a perl problem. It is an HTML one.
  5. Replies
    4
    Views
    2,428

    You can put the module just next to the binary...

    You can put the module just next to the binary and if it's not working, you can use lib and FindBin.html
  6. Replies
    1
    Views
    563

    none. And they are both the same as $var. If you...

    none. And they are both the same as $var. If you want to access the local variable, you can use the qualified name. This means, in main script $::var and in a package Foo $Foo::var.
  7. Replies
    2
    Views
    861

    look at the REMOTE_USER http header.

    look at the REMOTE_USER http header.
  8. Replies
    3
    Views
    898

    By the way, the difference between saying $foo++...

    By the way, the difference between saying $foo++ vs ++$foo is not that ++$foo is somehow incremented sooner or "immediately". It merely means that the expression returns the original or the...
  9. Replies
    3
    Views
    898

    There's a neat module called B::Deparse, that can...

    There's a neat module called B::Deparse, that can show you how exactly the perl interpreter understands your code. I saved the code in a file called precedence.pl and called the following line and...
  10. Replies
    3
    Views
    739

    I might add that a method gets the thing that's...

    I might add that a method gets the thing that's before the arrow as its first parameter, so when calling
    NewObject->new('red','green') the "new" method will get "NewObject" as the first parameter...
  11. Replies
    3
    Views
    739

    Firstly, I believe there's a typo. The two first...

    Firstly, I believe there's a typo. The two first red lines make little sense with $myobject. I would expect the variable to be $newobject, as declared one line above.

    What the first two red lines...
  12. The whole response consists of HTTP headers and...

    The whole response consists of HTTP headers and then the HTTP body. The HTTP body is a HTML document, which consists again of HTML head and HTML body but that's another story. The headers are set...
  13. It's a content-type issue. The server says this...

    It's a content-type issue. The server says this in the HTTP headers: Content-Type: text/plain. So check where the headers are set and change the content type to text/html.
  14. Replies
    6
    Views
    2,276

    I don't get it. What do you mean if they let you?...

    I don't get it. What do you mean if they let you? It's a hosting where you have some space and you can upload whatever source code you want, no?
  15. Replies
    6
    Views
    2,276

    Why don't you install them in your storage...

    Why don't you install them in your storage yourself?
  16. Replies
    6
    Views
    2,276

    Use a module. This is a function from my app that...

    Use a module. This is a function from my app that sends mail to users:


    use Email::MIME;
    use Email::Sender::Simple;
    use Email::Sender::Transport::SMTP;

    sub _sendmail {
    my ($c, $mail) =...
  17. Replies
    1
    Views
    4,246

    Well basically you would place the script to the...

    Well basically you would place the script to the cgi-bin directory and set its execute and read permissions. Then make a HTML page with the form. The action attribute of the form should be the URL of...
  18. Replies
    4
    Views
    3,939

    Then I'd hook the deleting all invalid sessions...

    Then I'd hook the deleting all invalid sessions to requests: Whenever a request comes, before anything else is done, delete the old sessions. You may want to store the last time the check was done...
  19. Replies
    2
    Views
    2,946

    sub get_record { my $record = ; ...

    sub get_record {
    my $record = <DATA>;
    chomp $record;
    return $record
    }

    my @records_buf;
    while (my $record = get_record()) {
    push @records_buf, $record;
    if (@records >= 3)...
  20. Replies
    4
    Views
    3,939

    I would set up a cron job every minute that will...

    I would set up a cron job every minute that will delete all sessions with mod time older than 15000ms. And of course with each request, actualize the session mod time. Where is the catch? Or is there...
  21. Replies
    2
    Views
    2,057

    What? What language is this? :-) What is the...

    What? What language is this? :-) What is the relationship of the first lines (amb ...) with the line below (12-05-30 ...)?

    If you just want to extract the time (with colons stripped), and save the...
  22. Replies
    2
    Views
    1,155

    my ($before_img1, $img1, $after_img1) = $bc[2] =~...

    my ($before_img1, $img1, $after_img1) = $bc[2] =~ /(.*?)(<\s*img\b[^>]*>)(.*)/;
  23. Replies
    1
    Views
    2,822

    You can't do that with Perl. Ask Google about...

    You can't do that with Perl. Ask Google about JavaScript file system API to do that.

    Otherwise, try to follow a tutorial. Handling forms with Perl is a completely basic topic, covered a thousand...
  24. Replies
    2
    Views
    714

    You can do so using globs: my $variable =...

    You can do so using globs:


    my $variable = 'foo';
    {
    no strict 'vars';
    *$variable = sub { print "Foo!\n"; };
    }
    foo();
  25. Replies
    4
    Views
    908

    Here's how I do it: use Email::MIME; use...

    Here's how I do it:


    use Email::MIME;
    use Email::Sender::Simple;
    use Email::Sender::Transport::SMTP;
    sub _sendmail {
    my ($mail, $cfg) = @_;

    my $to = $mail->{to};
Results 1 to 25 of 393
Page 1 of 16 1 2 3 4
HTML5 Development Center



Recent Articles