Re: translate IP mask

2008-10-16 Thread Sandy lone
On Thu, Oct 16, 2008 at 7:57 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > print "$ip/" . unpack "%32b*", inet_aton $mask; > ' Thanks, that's the cool solution. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

translate IP mask

2008-10-16 Thread Sandy lone
I need to translate an IP addr with its mask from this form: 192.168.1.30/255.255.255.0 to this one: 192.168.1.30/24 which module/method is right to use? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: cpan shell wrong

2008-10-16 Thread Sandy lone
On Wed, Oct 15, 2008 at 5:17 AM, <[EMAIL PROTECTED]> wrote: > I had a similar problem. Check out the contents of your urllist. This > is what mine looked like: > > cpan[1]> o conf urllist > urllist > 0 [] > 1 [ftp://carroll.cac.psu.edu/pub/CPAN/] > 2 [ftp://cpan-du

Re: variable in perl

2008-10-14 Thread Sandy lone
On Tue, Oct 14, 2008 at 10:58 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: >> >> [...] if for some reason you don't have access to perldoc > > Are there any installations of perl that don't include the manual? > Yes, I didn't have "man" installed on one of my hosts, so I can't rea

cpan shell wrong

2008-10-10 Thread Sandy lone
My CPAN shell seems wrong. When I tried to install modules, it got failed. The info is below. What wrong with this? Thanks. cpan> install Mail::Send CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Wed, 08 Oct 2008 22:26:52 GMT Running install for module Mail

Re: Passing "class" objects to a function

2008-09-30 Thread Sandy lone
2008/9/30 Vyacheslav Karamov <[EMAIL PROTECTED]>: > > I've made a mistake. Correct code: > > sub SomeFunc > { > my $node = shift @_; or: my $node = shift;# shift get @_ as the default arguments my ($node) = @_; # in list context, $node will get the f

Re: GUI form for text-based search

2008-09-30 Thread Sandy lone
On Tue, Sep 30, 2008 at 5:41 AM, bdy <[EMAIL PROTECTED]> wrote: > > What module, if one exists, could I use or tweak if I wanted to create > an HTML form to search those files in the aforementioned directories > with human readable output? > Try File::Find, that may be helps. -- To unsubscribe,

Re: Display GD graph on the screen.

2008-09-29 Thread Sandy lone
On Mon, Sep 29, 2008 at 4:05 PM, Funny Perl <[EMAIL PROTECTED]> wrote: > I just start to learn perl on GD graph. My OS is Linux. > > I got a example, but how can I display the graph on the screen ? use > Gtk2 or something else? > Generally we use GD to print the graphs to web browsers. I didn't kn

Re: Tie::FILE vs open

2008-09-28 Thread Sandy lone
On Mon, Sep 29, 2008 at 12:34 PM, org chen <[EMAIL PROTECTED]> wrote: > > I have a huge file, there are 47,286,116 lines. I am search a line and > repalce this line with another string. I know this line is between > 20,000,000th to 30,000,000th lines. Which way is more fast and safe: > The secon

Re: Internet explorer viewing options, run script but was prompted to download

2008-09-28 Thread Sandy lone
Seems you didn't have the webserver configured correctly to run cgi scripts for the req-path of cgi-bin. On Sun, Sep 28, 2008 at 2:28 PM, itshardtogetone <[EMAIL PROTECTED]> wrote: > Hi, > I use internet explorer 7.0 to browse the website. > I upload a simple script, helloworld.cgi, to my website

Re: dump all name space?

2008-09-27 Thread Sandy lone
On Sun, Sep 28, 2008 at 2:42 AM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > From: oldyork90 <[EMAIL PROTECTED]> >> Is there a way to dump the name space; show all var names and values? > > print Dumper(\%main::); Not so right. This can only dump the package variables, not a my v

Re: dump all name space?

2008-09-27 Thread Sandy lone
On Sat, Sep 27, 2008 at 3:11 AM, oldyork90 <[EMAIL PROTECTED]> wrote: > Is there a way to dump the name space; show all var names and values? > > If the name space is an object, you could show its structure with Data::Dumper. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Non standard entity conversion

2008-09-26 Thread Sandy lone
That was somewhat strange. For better solution you may ask to this module's author. On Fri, Sep 26, 2008 at 9:46 PM, V.Ramkumar <[EMAIL PROTECTED]> wrote: > > Tool output: > Ḥ Ḥ >     > > Expected output: > Ḥ &Hdb; >     > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Handling OLD files

2008-03-28 Thread Sandy
On Mar 27, 1:40 pm, [EMAIL PROTECTED] (Anders) wrote: > I am looking for a way of moving files older than a date, > I am need this in a script for moving/erase old files from a > production machine Try using File::Find http://search.cpan.org/~nwclark/perl-5.8.7/lib/File/Find.pm /s

Re: how to repeat non-atom patterns

2008-03-28 Thread Sandy
to define pattern to match > > my $match= qr/ {:[0-9a-e][0-9a-e]}{6} /; > print matched if /$match/ ; I think it must be: qr/(:[0-9a-e][0-9a-e]){6}/; Note parenthesis instead of curly braces and no leading and trailing spaces. /sandy http://myperlquiz.com/ -- To unsubscribe, e-mail: [

Re: system calls return code

2008-03-27 Thread Sandy
mand line correctly, try IPC::Run. It is a bit tricky to use first, but can safely run any pipelines. Another way: try using native Perl methods. opendir() and readdir() instead of ls, match file names with regex, and then read and append files, or run cat. /sandy http://myperlquiz.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: need to find all the directories which have soft links in it

2008-03-26 Thread Sandy
dirs with '-d' operator). You may want to include a loop detection logic, so you don't cycle forever if there is a loop Do you necessarily need it in Perl? Consider calling 'find' if you are on Unix. 'man find' for options /sandy http://myperlquiz.com/ -- To un

Per Module Authen::pam Problem

2008-03-14 Thread sandy
Hi, I have an perl programme that change password but not interactively.. the programme run and ends with this message "Authentication token manipulation error" __ #!/usr/bin/perl -w use Authen::PAM; $service = "passwd"; $

reg exp help

2006-04-27 Thread sandy
-- Hi, The content of file hello.c is as given below. I want to count how many + and - are there in this file. I had equivalent shel command to count no. of + and -, grep -e "^+[^+]" diffs.txt | wc -l grep -e "^-[^-]" diffs.txt | wc -l Can anyone help me how to write perl script using

Regular Exression help

2006-04-27 Thread sandy
Hi, The content of file hello.c is as given below. I want to count how many + and - are there in this file. I had equivalent shel command to count no. of + and -, grep -e "^+[^+]" diffs.txt | wc -l grep -e "^-[^-]" diffs.txt | wc -l Can anyone help me how to write perl script using regular ex

Re: Plz help

2005-10-11 Thread Le Sun (Sandy)
The Roopak Times wrote: Hi All As i was continuing with perl i created a program to churn out individual directory names from a given path in windows.Here is the program: #use warnings; #use strict; Print "Enter the path:"; my $dir=; chomp($dir); my @DIR=split ///, $dir; print $DIR[0]; but it th

Re: catchDate

2005-09-08 Thread Le Sun (Sandy)
Why not use `date' directly?If you want to use perl indeed,how about this: #!/usr/bin/perl -w system("date \"+Day: %d\""); Christopher Spears wrote: I want to catch the various parts of the output of the date command. Here is my script: #!/usr/bin/perl -w use strict; my $date = system("dat

test

2004-12-31 Thread Sandy Santra
This is another test in an attempt to post to the list. No response necessary. --Sandy Santra -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Test

2004-12-31 Thread Sandy Santra
/html' (#5.2.3) so right now I'm emailing directly from my yahoo account to see if that works. Sorry for the bandwidth, and no reply necessary (unless you have an idea on what the above message means). --Sandy Santra

Re: Two easy questions.

2004-09-21 Thread Le Sandy Sun
yes.I think your question is making the 'perl command interpret' default to excute the plx file that you made.You can make the configration in windos to solve the problem. -Sandy Drue Reeves wrote: Truly newbie questions Why do some scripts have a CGI extension while other a .pl

Re: How to update perl5?

2004-08-07 Thread Le Sandy Sun
I think there is some problem.Because I can not change anything in /usr/dist.That is the point.The perl5 file and the perl5 profile.So that I get there ,but can do nothing. Owen wrote: On Sat, 07 Aug 2004 17:29:34 +0800 Le Sandy Sun <[EMAIL PROTECTED]> wrote: Well,there are two perl5

How to update perl5?

2004-08-07 Thread Le Sandy Sun
Well,there are two perl5 in my solairs mechine. The defualt is perl5,v5.003 and another is perl5,v5.6.1 My question is how can I change the defualt perl5 from v5.003 to v5.6.1? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <

Re: How do I check disk space through Perl?

2003-05-27 Thread sandy pleissner
hi, an easy way => $tell_it = system("dir"); :-), sandy [EMAIL PROTECTED] wrote: Hi All, It seems like I should know this, but I don't, and I can't seem to find it written anywhere. I need to check disk space on an NT platform using ActiveState Perl 5.6.1. Is there

re:felloship chat

2003-02-16 Thread sandy brandes
it keeps tellinj me to push refresh button,No siccess.Then it says push reload button on browser. But can you please tell me hoe to do this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]