www.webdeveloper.com

Search:

Type: Posts; User: Sixtease

Page 1 of 16 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    2
    Views
    568

    look at the REMOTE_USER http header.

    look at the REMOTE_USER http header.
  2. Replies
    3
    Views
    409

    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...
  3. Replies
    3
    Views
    409

    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...
  4. Replies
    3
    Views
    434

    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...
  5. Replies
    3
    Views
    434

    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...
  6. 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...
  7. 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.
  8. Replies
    6
    Views
    1,812

    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?
  9. Replies
    6
    Views
    1,812

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

    Why don't you install them in your storage yourself?
  10. Replies
    6
    Views
    1,812

    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) =...
  11. Replies
    1
    Views
    3,200

    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...
  12. Replies
    4
    Views
    3,344

    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...
  13. Replies
    2
    Views
    2,452

    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)...
  14. Replies
    4
    Views
    3,344

    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...
  15. Replies
    2
    Views
    1,861

    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...
  16. Replies
    2
    Views
    884

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

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

    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...
  18. Replies
    2
    Views
    522

    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();
  19. Replies
    4
    Views
    695

    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};
  20. Replies
    2
    Views
    440

    What you do is: for each line { add the line...

    What you do is:

    for each line { add the line to @urls; print the whole @urls array }

    Of course you end up with
    url1
    url1 url2
    url1 url2 url3

    The simplest thing were to move the printing...
  21. Replies
    5
    Views
    555

    Show me an example of the variable $user_remove...

    Show me an example of the variable $user_remove contains.

    If it has just the username (and that's the sufficient match criterion), then you can check if it's the last word on $line:

    $line =~...
  22. Replies
    5
    Views
    555

    one solution could be (assuming the users to...

    one solution could be (assuming the users to remove are in @users_remove array) to replace the loop with:
    LINE:
    foreach my $line (@file_lines) {
    foreach my $user_remove (@users_remove) {
    ...
  23. That's what you write in your regexp ^{\*+$...

    That's what you write in your regexp

    ^{\*+$
    ^: line start
    {: literal "{"
    \*: literal "*"
    +: repetition
    $: end of line
    So if there's anything else than just {******, the match fails.
  24. To me, it looks like your first regexp...

    To me, it looks like your first regexp substitution wipes out the whole content of $line. But it's hard to tell without knowing what's in the @file array.
  25. I'm too lazy to try and decipher what it should...

    I'm too lazy to try and decipher what it should do. Please, tell me what you expect the $cmd variable to contain, exactly.
Results 1 to 25 of 387
Page 1 of 16 1 2 3 4
HTML5 Development Center



Recent Articles