Hello,
The chomp function will chomp off the last character
if its a new line.
Spaces wont be truncated by chomp.
Regards
Nishanth
> Hello
>
> I am wondering how the chomp function works. I am
> looking to see how
> I can truncate new line and/or carriage returns from
> a string. Will
> chom
Hello,
This has nothing to do with the Perl.
You can achieve this through the IIS.
Click on domain and then properties in IIS.
click on Directory security and there you are.
This is the best method rather than through perl.
Regards
Nishanth
--- Chico <[EMAIL PROTECTED]> wrote:
> Have a windows
Hello,
I tried this and worked.
Please let me know in case you find any bugs in this
:)
$url="http://dev.catalyst.perl.org/wiki/YetAnotherCatalystIntro";;
if( $url =~ /\/([\w.]*$)/ ){
print $1;
}
else{
print "No Match";
}
Regards
Nishanth
--- Tom Phoenix <[EMAIL PROTECTED]> wro
Hello Praveena,
I recommend you to use pack and unpack function.
I believe you can use this to convert the digit to
binary and also extract the digit of your choice from
the result.
perldoc -f pack
type this command at your linux console if any to get
the help on pack.
Regards
Nishanth
--- Prav
Hello,
In case of linux you have to escape the . and the
function name should be split and not Split.
Not quite sure about windows.
Regards
Nishanth
--- M Senthil Kumar <[EMAIL PROTECTED]> wrote:
> On Mon, 17 Apr 2006, Irfan J Sayed wrote:
>
>
> |i want to split this line in . and store in ar
#!/usr/bin/perl
use strict;
use diagnostics;
my $month;
print "\t Enter Month of a year \n";
chomp($month = <>);
my %days_month = (
January => 31,
February => 28,
March => 31
);
print "\t Number of Days in month of $month is
$days_month{$month} \n";
___
Hello Sonika,
> Now i need to have a web interface to this.
> so i have few questions:
> 1. perl - cgi or php?
go for perl-cgi
> 2. how do i execute the perl programs on a different
> system than the web
> server.
If you want to run a subroutine that is located on
another server, you can use
Hello,
Use this code according to your requirement.
#!/usr/bin/perl
$no=`date`;
print $no;
Regards
Nish
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAI
Nishanth
--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote:
> nishanth ev schreef:
> > Dr.Ruud:
> >> nishanth ev:
>
>
> Please don't top-post. Please cut the text that you
> don't react upon,
> especially sigs and tails.
>
> >>> def
ite to
/dev/null: $!";
defined(my $pid = fork) or die "Can't fork: $!";
setsidor die "Can't start a new
session: $!";
Enjoy...!!!
Regards
Nishanth
--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote:
> nishanth ev schreef:
>
> &g
Hello,
Just create a daemon and then put an infinite loop.
Call the subroutines with a sleep set accordingly, so
that the subroutine will run only at specified
interval.
Below is an sample code you can use.
Program will run as a daemon and you can kill it using
kill -9
Regards
Nishanth
#!/us
Edit your loop like this
while ($networkpart <= 158){
while ($hostpart <= 256){
print "202.90.".$networkpart.".".$hostpart, "\n";
$hostpart++;
}
#
#Change the $hostpart back to 0
#
$hostpart=0;
$networkpart++;
}
--- Harold Castro <[EMAIL PROTECTED]> wrote:
> Hi,
>
Put one line at the starting
$|=1;
Actually it can be any value other than 0.
Regards
Nishanth
--- Chas Owens <[EMAIL PROTECTED]> wrote:
> On 3/13/06, Tommy Grav <[EMAIL PROTECTED]> wrote:
> > I am writing some output to a file using printf.
> However this output
> > is buffered.
> > How do I g
You can use sysseek function.
For more info use perldoc perlfunc
or the following link
http://perldoc.perl.org/functions/sysseek.html
Regards
Nishanth
--- [EMAIL PROTECTED] wrote:
> After I use <> operator on s file handle, I need
> read it from head again. I
> found these is no rewind funct
Hello,
I have found the right thing for starting the service
using cgi.
There is a software called super
ftp://rpmfind.net/linux/contrib/libc6/i386/super-3.12.1-1.i386.rpm
Install this and configure the same.
Put relevent entries in /etc/super.tab
Your script will run with full root privileges.
Hello folks,
Thanks a lot for the reply.
I dont mean exactly httpd.
Any Service will do.
I want to start and stop a serviec using cgi script.
Say mysql service will do,
#!/usr/bin/perl
`/etc/rc.d/init.d/mysqld restart`;
print"Content-type:text/html\n\n";
print"RESTARTED";
hello Friends,
Have anyone tried stopping a service say httpd usng a
cgi script ?
I have set a setuid for the cgi script and the script
is in the root cgi-bin directory namely
/var/www/cgi-bin/ with ownership root and have the
following contents in the file
#!/usr/bin/perl
$ENV{'PATH'} = '/bin:/u
17 matches
Mail list logo