Re: bizarre math

2005-12-03 Thread Bryan Harris
>> I just ran into this today, and have no clue what's going on: >> >> % perl -e 'print 10-5.5, "\n"' >> 4.5 >> % perl -e 'print 10-05.5, "\n"' >> 55 >> >> How does 10 minus 5.5 equal 55? Obviously it's the leading zero, but I >> can't think of any reason why it should do that... > > It seems

Re: config files

2005-12-03 Thread M. Lewis
Randal L. Schwartz wrote: "M" == M Lewis <[EMAIL PROTECTED]> writes: M> do '/absolute/path/to/mcr.conf'; M> Which defeats my purpose of getting the configuration items out of the M> scripts themselves. I don't want the users to have to edit the three M> scripts, only the mcr.conf file. If

Re: bizarre math

2005-12-03 Thread Beau E. Cox
Hi Bryan Harris - At 2005-12-03, 19:19:02 you wrote: > > >I just ran into this today, and have no clue what's going on: > >% perl -e 'print 10-5.5, "\n"' >4.5 >% perl -e 'print 10-05.5, "\n"' >55 > >How does 10 minus 5.5 equal 55? Obviously it's the leading zero, but I >can't think of any reaso

bizarre math

2005-12-03 Thread Bryan Harris
I just ran into this today, and have no clue what's going on: % perl -e 'print 10-5.5, "\n"' 4.5 % perl -e 'print 10-05.5, "\n"' 55 How does 10 minus 5.5 equal 55? Obviously it's the leading zero, but I can't think of any reason why it should do that... - B -- To unsubscribe, e-mail: [EMA

file::find

2005-12-03 Thread robert
Greetings folks! how`s doing? ;) ,, i`ve one question for you. I`m trying to count files on drive using file::find module with latest activestate perl build. I want to achieve same result like running command "dir /S" from the root, e.g f:\dir /S. Problem is that my script returns less files li

Re: Moving Folder Access denied

2005-12-03 Thread Mulander
> Just a brief of what is hapening > i have a file with text like this > > aaa.bbb e:\cme\abc.vws > > i am splitting this data based on space and want to move the data in > e:\cme\abc.vws to e:\cme1\. > How many spaces do you have between the filenames ? If more then one adjust your regex in s

installing DBD::mysql

2005-12-03 Thread Octavian Rasnita
Hi, I have tried to install DBD::mysql under Linux manually and also using cpan, but the "make test" command gives the error saying that it can't connect to the server using the socket /var/lib/mysql/mysql.sock. I know that MySQL is not using that socket but /tmp/mysql.sock, but I don't know how

Re: Why not to use env (was Re: Perl executable pathname needs to be hardwired?)

2005-12-03 Thread Chris Devers
On Sat, 3 Dec 2005, Randal L. Schwartz wrote: > > "Chris" == Chris Devers <[EMAIL PROTECTED]> writes: > > Chris> My understanding is that the Python idiom is to avoid putting the full > Chris> path, in favor of something like > > Chris> #!/usr/bin/env python > > This won't work if env

Re: Flushing Buffers (WAS: recursive search)

2005-12-03 Thread John Doe
John W. Krahn am Samstag, 3. Dezember 2005 15.27: > John Doe wrote: > > The Ghost am Freitag, 2. Dezember 2005 19.30: > >> print "$_: "; > >>my @lines=; > > > > and close opened files: > > > > close FILE or die "couldn't close $File::Find::name: $!"; > > > >>print "$#lines\n

Re: Open source IDE for Perl

2005-12-03 Thread Randal L. Schwartz
> "Andrej" == Andrej Kastrin <[EMAIL PROTECTED]> writes: Andrej> Dear all, Andrej> which is yours "best" open source IDE for Perl. I use SciTE under Andrej> Linux, but I'm a little confused on Windows. Which do you prefer? GNU Emacs. Runs fine on Unix, Windows, Darwin, etc. -- Randal L. Sc

Re: config files

2005-12-03 Thread Randal L. Schwartz
> "M" == M Lewis <[EMAIL PROTECTED]> writes: M> do '/absolute/path/to/mcr.conf'; M> Which defeats my purpose of getting the configuration items out of the M> scripts themselves. I don't want the users to have to edit the three M> scripts, only the mcr.conf file. If your configs are relative

Re: Help with syntax "local (*in);

2005-12-03 Thread Randal L. Schwartz
> "Timothy" == Timothy Johnson <[EMAIL PROTECTED]> writes: Timothy> You're creating a typeglob *in and declaring it to be local. I'm not Timothy> sure why you would want to do this, but this makes $in, @in, and %in all Timothy> local. and &in, and the filehandle/directoryhandle "in", also l

Re: Perl executable pathname needs to be hardwired?

2005-12-03 Thread Randal L. Schwartz
> "Adriano" == Adriano Ferreira <[EMAIL PROTECTED]> writes: Adriano> Ok. I will try to be less lazy. What I was trying to workaround is to Adriano> place perl binaries at a place available to my user, using a Adriano> distribution which was supposed to be installed by 'root' (which I am Adrian

Why not to use env (was Re: Perl executable pathname needs to be hardwired?)

2005-12-03 Thread Randal L. Schwartz
> "Chris" == Chris Devers <[EMAIL PROTECTED]> writes: Chris> My understanding is that the Python idiom is to avoid putting the full Chris> path, in favor of something like Chris> #!/usr/bin/env python This won't work if env is not in /usr/bin (like say, /bin/env). Chris> #!env pyth

Re: Flushing Buffers (WAS: recursive search)

2005-12-03 Thread John W. Krahn
John Doe wrote: > The Ghost am Freitag, 2. Dezember 2005 19.30: > >> print "$_: "; >> my @lines=; > > and close opened files: > > close FILE or die "couldn't close $File::Find::name: $!"; > >> print "$#lines\n"; >> $totalLines+=$#lines; #wanted's value is ignored

Re: Flushing Buffers (WAS: recursive search)

2005-12-03 Thread John W. Krahn
John Doe wrote: > The Ghost am Freitag, 2. Dezember 2005 19.30: > >> open FILE, "<$File::Find::name"; > > Always check if operations succeeded: > >open (FILE, '<', $File::Find::name) > or die "couldn't open $File::Find::name: $!"; Thanks, don't know how I missed that. :-) Jo

Intercommunication between Perl and C

2005-12-03 Thread He Nan
What should I do if I need an intercommunication between a perl and c program ? Are there any examples I could follow , or what books I should read ? I'm confused...

Re: Flushing Buffers (WAS: recursive search)

2005-12-03 Thread John Doe
The Ghost am Freitag, 2. Dezember 2005 19.30: Hi, In addition to John W. Krahn's good advices: > So far I did this: > > #!/usr/bin/perl > > use File::Find; > my $totalLines; > find(\&wanted, '@directories'); > sub wanted { >unless ($_=~m/.html|.mas|.pl|.txt$/i) {return 0;} #fil

Re: Sockets questions

2005-12-03 Thread Octavian Rasnita
From: "Scott" <[EMAIL PROTECTED]> > I recently started messing with perl sockets and I was wondering if it is > possible to do any of the following: > > - Pre-shared key, to act as some sort of authentication. Currently I have > it checking the peer address, but I figure that could be spoofed. >