User Profile

Collapse

Profile Sidebar

Collapse
rajiv07
rajiv07
Last Activity: Oct 23 '09, 07:00 AM
Joined: Jun 11 '07
Location: Chennai
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rajiv07
    replied to how to count certain words
    in Perl
    numberwhun,

    Hereafter I wont repeat such a mistake.

    Regards
    Rajiv...
    See more | Go to post

    Leave a comment:


  • rajiv07
    replied to how to count certain words
    in Perl
    Code:
    my $val='rajiv gandhi rajiv rajiv';
    my $count=$val=~ s/rajiv/rajiv/g;
    print $count;
    try this
    See more | Go to post
    Last edited by numberwhun; Aug 1 '08, 07:21 PM. Reason: Please use code tags

    Leave a comment:


  • rajiv07
    replied to CGI Script
    in Perl
    Your script should be inside the cgi-bin directory which is a special directory to run the perl script.

    Regards
    Rajiv
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Permission Denied
    in Perl

    Permission Denied

    Hi to all,

    I have a simple script to write something in to a file and read from the file.But it gives Permission Denied error

    My Script

    [CODE=perl]#!C:\Program Files\SWsoft\Pl esk\Additional\ Perl\bin\perl.e xe
    use CGI::Carp 'fatalsToBrowse r';
    use strict;
    use warnings;
    use CGI;

    my $file="C:/Inetpub/vhosts/imi.in/cgi-bin/elearning/query/1.html";
    ...
    See more | Go to post

  • rajiv07
    replied to Path problem
    in Perl
    I got the solution.The problem is the working directory is c:/inutpub/cgi-bin/ but the perl scripts are in c:/inutpub/cgi-bin/elearning/query/ so if i call '../templates/myfile.html' it check in c:/inutpub/templates/myfile.html which is not there.so it simply gives error.
    we can findout the working directory using getpwd() function


    Regards
    Rajiv
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Path problem
    in Perl

    Path problem

    Hi to all,

    I am running a perl script under Windows 2003 IIS 6.0 server.In my script i try to read a html file.For that i have use the relative path

    my $file="../templates/myfile.html";

    But it says the file is not exist,which is existing.But when i use absolute path
    (my $file="C:/Inetpub//cgi-bin/elearning/templates/myfile.html";) its working fine.

    my wondering...
    See more | Go to post

  • specified CGI application misbehaved by not returning a complete set of HTTP header

    Hi to all ,

    I am using windows 2003 IIS 6.0 web server and i have a web application which is developed using perl language.If i run tis application it gives some errors

    my error

    The specified CGI application misbehaved by not returning a complete set of HTTP headers

    Is anything i have to configure in server

    Please suggest any idea.

    Regards
    Rajiv
    See more | Go to post

  • rajiv07
    replied to CGI header problem
    in Perl
    Thanks Kevin,

    Actually i am trying to move all script from Linux Server to windows server.No program is work.All script gives the same error.i could not find any problem.But when i run a simple test script its working fine.

    My testing script

    [CODE=perl]#!C:/perl/bin/perl.exe
    use CGI qw/:standard/;

    use CGI::Carp qw(fatalsToBrow ser);

    my $q=new CGI;

    ...
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic CGI header problem
    in Perl

    CGI header problem

    Hi to all

    I have a script to get geo IP which is successfully running on Linux server.but when i run this script on windows server it gives some header error

    [CODE=perl]#!C:/Perl/bin/perl.exe
    use CGI qw/:standard/;
    use LWP::UserAgent;
    use HTTP::Request qw(GET POST);
    use HTTP::Headers;

    use CGI::Cookie;
    use CGI::Session;

    use CGI::Carp qw(fatalsToBrow ser);...
    See more | Go to post

  • rajiv07
    replied to Helop on file name display
    in Perl
    Thank You for your replies



    Rajiv
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Helop on file name display
    in Perl

    Helop on file name display

    Hi to all,

    I have a script to list the file names in a directory .When i run this script locally (command prompt) it displays the exact file name (even though the file name has two spaces).But i upload the script into server (Browser) it shows trimmed file names(single space for double spaces).

    I have checked both IE and Firefox it shows only single space file name instead on double space file name. Is it browser problem....
    See more | Go to post

  • rajiv07
    replied to Help on Regex
    in Perl
    Thank You Nithin,

    Why cannot we use escape the special regex char.its also working fine.Is any problem will occur when using this concept,if so please let me know and could u suggest any regexp site to refer.

    Regards

    Rajiv...
    See more | Go to post

    Leave a comment:


  • rajiv07
    replied to Help on Regex
    in Perl
    I got the point now if the string contain regex special character like $,^ ) we have to escape the character.

    Regards
    Rajiv
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Help on Regex
    in Perl

    Help on Regex

    Hi to all,

    I have regex related pl fie below.when i execute the file it gives some error.

    [CODE=perl]#!/usr/bin/perl
    my @array=('324234 2','fdsfsd4432' );

    my $file='D:/HTTP/sample/SAREGAMA/HINDI/01/INH100155170 O HANSINI(ZEHREEL A INSAAN.wma';

    my @ee=grep(/^$file$/,@array);

    print @ee;[/CODE]


    My error

    Unmatched ( in regex; marked by...
    See more | Go to post

  • rajiv07
    replied to Bad file Descriptor
    in Perl
    Thanks Kevin.Its working fine.I have spent 1 hour to sort this but i couldn't find the small mistake.

    Regards
    Rajiv...
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Bad file Descriptor
    in Perl

    Bad file Descriptor

    Hi i have script for upload file to server.when i execute this script it gives Bad file Descriptor error.could u anybody help on this.

    [CODE=perl]
    use strict;
    use CGI;
    use CGI::Carp qw(fatalsToBrow ser);
    use File::Basename;
    use diagnostics;
    $CGI::POST_MAX = 1024 * 1000;
    $CGI::DISABLE_U PLOADS = 0;
    my $query=new CGI;

    my $file = $query->param("file" )...
    See more | Go to post

  • rajiv07
    replied to Difference between Primary key and Unique
    Thanks for your replies.I will go through it.

    Rajiv
    See more | Go to post

    Leave a comment:


  • rajiv07
    replied to Time Calculation problem
    in Perl
    Thank nithinpes

    But If i apply for this script for 01-21-2009 this gives 01-21-2010.but after 2007 the 2011 and 2015.. are gives my expected output.The years 2008,2009,2010 are not giving the expected output.

    Regards
    Rajiv...
    See more | Go to post

    Leave a comment:


  • rajiv07
    replied to Time Calculation problem
    in Perl
    Thanks Raghuram,

    Actually my doubt is if i add 365 days in 22-05-2007 the output comes like 21-05-2008.But if i add the same 365 days in 22-05-2008 the output comes like
    22-05-2009,But my expected output is 21-05-2009....
    See more | Go to post

    Leave a comment:


  • rajiv07
    started a topic Time Calculation problem
    in Perl

    Time Calculation problem

    I have a script to calculate the warranty the period of one year.I add 365 days of current date.I got the correct output for the year 2007 but the 2008 year calculation getting incorrect value.please anybody explain me what is happening here.

    [CODE=perl]#!/usr/bin/perl
    use Time::Local;

    my $time=timelocal (0,0,0,21,4,200 7);

    my $warrenty="";

    $warrenty=local time($time+60*6 0*24*365);...
    See more | Go to post
No activity results to display
Show More
Working...