numberwhun,
Hereafter I wont repeat such a mistake.
Regards
Rajiv...
User Profile
Collapse
-
try thisCode:my $val='rajiv gandhi rajiv rajiv'; my $count=$val=~ s/rajiv/rajiv/g; print $count;
Leave a comment:
-
Your script should be inside the cgi-bin directory which is a special directory to run the perl script.
Regards
RajivLeave a comment:
-
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";
... -
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
RajivLeave a comment:
-
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... -
rajiv07 started a topic specified CGI application misbehaved by not returning a complete set of HTTP headerin IISspecified 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 -
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;
...Leave a comment:
-
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);... -
-
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.... -
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...Leave a comment:
-
I got the point now if the string contain regex special character like $,^ ) we have to escape the character.
Regards
RajivLeave a comment:
-
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... -
Thanks Kevin.Its working fine.I have spent 1 hour to sort this but i couldn't find the small mistake.
Regards
Rajiv...Leave a comment:
-
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" )... -
-
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...Leave a comment:
-
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....Leave a comment:
-
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);...
No activity results to display
Show More
Leave a comment: