Re: Can Perl be faster than C ?

2004-04-26 Thread Robin Sheat
On Tue, Apr 27, 2004 at 02:31:34AM -0400, Randy W. Sims wrote: > Perl is implemented in C. It can only be as fast as C, assuming a > competent C programmer. However, I imagine there are situations where a programmer who doesn't optimise for speed (or isn't a great programmer) will end up with Per

question

2004-04-26 Thread Sujana_Setty
can i take input to associative array from the user like this: %words=; -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 12:02 PM To: Sumanth Sharma Cc: [EMAIL PROTECTED] Subject: Re: Can Perl be faster than C ? Sumanth Sharma wrote: > Hi A

Re: Hash internals ?

2004-04-26 Thread Randy W. Sims
Sumanth Sharma wrote: Hi All, Pls throw some light on How are hashes handles internally?. Uhm, not sure what you mean. If your asking how they are implemented then the answer is hash tables. You can find a good description in any decent data structure & algorithm book. Or see,

Re: Can Perl be faster than C ?

2004-04-26 Thread Randy W. Sims
Sumanth Sharma wrote: Hi All, Are there instances/scenarios where Perl can really be faster that C/C++. (Do not include coding or design time here, consider only run-time). Perl is implemented in C. It can only be as fast as C, assuming a competent C programmer. Randy. -- To unsubscribe, e-

Re: Why Perl

2004-04-26 Thread Randy W. Sims
Sumanth Sharma wrote: Hi All, Can some list some points where perl really stands out from other languages. erm, pick any perl (or python, or ruby, or ...) group and search the archives. This question has been asked in many forms in many places. The only place major differences are CPAN and co

Hash internals ?

2004-04-26 Thread Sumanth Sharma
Hi All, Pls throw some light on How are hashes handles internally?. Thanks in Advance, Sumanth Sharma -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Can Perl be faster than C ?

2004-04-26 Thread Sumanth Sharma
Hi All, Are there instances/scenarios where Perl can really be faster that C/C++. (Do not include coding or design time here, consider only run-time). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Why Perl

2004-04-26 Thread Sumanth Sharma
Hi All, Can some list some points where perl really stands out from other languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Process folder structure into new structure

2004-04-26 Thread Robin Sheat
On Mon, Apr 26, 2004 at 09:32:47PM -0700, Bryan Harris wrote: > It does, Rob, thanks! This belongs on a "very helpful perl code" page > somewhere. I've begun one at http://www.kallisti.net.nz/PerlTips feel free to add it (it's a wiki). -- Robin <[EMAIL PROTECTED]> JabberID: <[EMA

Re: Process folder structure into new structure

2004-04-26 Thread Bryan Harris
> Take a look at Path::Class to manipulate relative paths and File::Path to > create complete paths if the don't exist. The code below creates a new > absolute path for the source and destination directories and then, within > File::Find's Wanted routine, calculates the contents of $File::Find::n

Re: perl mysql question

2004-04-26 Thread Randy W. Sims
On 4/26/2004 11:53 PM, Daniel Staal wrote: --As of Monday, April 26, 2004 5:30 PM -0700, Christopher Lyon is alleged to have said: So, how to I get the values to look like in variable so that I can push them back into a new table: New Table namecount -+--- Widgets-A|25 Wi

Re: forcing stack backtrace in the case of unhandled exception/Perl error

2004-04-26 Thread David Garamond
Randy W. Sims wrote: On 4/26/2004 1:02 PM, David Garamond wrote: I've [re]discovered the wonderful world of Carp. I've now peppered most of my scripts with 'use Carp qw(verbose);'. However, whenever things go wrong (like my program calls an undefined subroutine, or I tried to modify a constant)

Re: perl mysql question

2004-04-26 Thread Daniel Staal
--As of Monday, April 26, 2004 5:30 PM -0700, Christopher Lyon is alleged to have said: So, how to I get the values to look like in variable so that I can push them back into a new table: New Table namecount -+--- Widgets-A| 25 Widgets-B| 10 Widgets-C| 20 Wi

perl mysql question

2004-04-26 Thread Christopher Lyon
Not sure if I should post this to beginners or not but there it goes. I have 10+ tables with some of the same information in each in table of a mysql database. Here is an example: Table 1 namecount -+--- Widgets-A| 10  Widgets-B| 5 Widgets-C| 10 Widgets-D

OT: RE: Security Question

2004-04-26 Thread Tim Johnson
I think this is off-topic for this list. It's more of a cryptography question than a Perl question (and it's not even really a question). -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Monday, April 26, 2004 3:44 PM To: [EMAIL PROTECTED] Subject: Re: Security

Re: Security Question

2004-04-26 Thread Jenda Krynicky
From: WC -Sx- Jones <[EMAIL PROTECTED]> > Originally I asked this question around 1998, I'd like to see > if anything new has occurred since then because the client I > wrote the security code for which generated this key is *still* > using that application today - > > > Please, decode this key:

Re: forcing stack backtrace in the case of unhandled exception/Perl error

2004-04-26 Thread Randy W. Sims
On 4/26/2004 1:02 PM, David Garamond wrote: I've [re]discovered the wonderful world of Carp. I've now peppered most of my scripts with 'use Carp qw(verbose);'. However, whenever things go wrong (like my program calls an undefined subroutine, or I tried to modify a constant), my program dies wit

Re: Regexp matching problems

2004-04-26 Thread Randy W. Sims
On 4/26/2004 4:27 PM, Price, Jason (TLR Corp) wrote: Is there a way I can view system characters in a variable? my $str = "\n\r\bHello, World!\n"; printf( "%02x ", ord $_ ) for split //, $str; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regexp matching problems

2004-04-26 Thread Price, Jason (TLR Corp)
I am having problems with one of my regexp substitutions not matching the first line returned in a set, and I'm having trouble figuring out why. I figure there's probably a hidden system character or something of the sort that is causing my regexp to fail. Here's the scenario: I'm forking off

Modules

2004-04-26 Thread Shilpa Arvind
Hi, I have a subroutine which is used by 2 programs. I want to make that subroutine a module. The subroutine uses some variables which i have declared in my main program. I am not able to pass those variable to my module. The subroutine is given below: The variables $base_files_used$exp_string

Re: #include like in C

2004-04-26 Thread JupiterHost.Net
$a = $main::ARGV[1]; $b = $main::ARGV[2]; $c = function($a,$b); .. So, having to use $main:: is really an ugly and dangerous solution, and hence why I really don't like the "use" or "require" solutions. "do" Why is using main:: dangerous? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: #include like in C

2004-04-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There are 4 ways to do what you want. The closest is probably 'do' perldoc -f do I would recommend the module approach as has already been suggested: perldoc -f use perldoc -f require So far, "do" is looking like the be

Re: using Hash::Case and Storable

2004-04-26 Thread Andrew Gaffney
Wiggins d Anconia wrote: Wiggins d Anconia wrote: [snip] my $thawed = retrieve('somefile'); tie my(%realhash), 'Hash::Case::Lower', $thawed; Ah, I guess I'd missed that part in the docs for the Hash::Case::Lower module. Is it safe to 'delete $thawed' after I tie the hash so I don't have an ex

Re: using Hash::Case and Storable

2004-04-26 Thread Wiggins d Anconia
> Wiggins d Anconia wrote: [snip] > > > > my $thawed = retrieve('somefile'); > > tie my(%realhash), 'Hash::Case::Lower', $thawed; > > Ah, I guess I'd missed that part in the docs for the Hash::Case::Lower module. Is it safe > to 'delete $thawed' after I tie the hash so I don't have an extra co

Re: using Hash::Case and Storable

2004-04-26 Thread Andrew Gaffney
Wiggins d Anconia wrote: I'm using the Storable module to save and load a hash tree. I also want to use the Hash::Case::Lower module to make my hash case insensitive. I can't figure out how to tie a hashref to the Hash::Case::Lower module and load data into it with Storable. I tried something

perl.beginners Weekly list FAQ posting

2004-04-26 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

forcing stack backtrace in the case of unhandled exception/Perl error

2004-04-26 Thread David Garamond
I've [re]discovered the wonderful world of Carp. I've now peppered most of my scripts with 'use Carp qw(verbose);'. However, whenever things go wrong (like my program calls an undefined subroutine, or I tried to modify a constant), my program dies without the stack backtrace. Any idea how I can

Re: mailing list manager in perl

2004-04-26 Thread Mike Blezien
check out HotScripts, http://www.hotscripts.com Prem Vilas Fortran M. Rara wrote: I'm looking for a very good mailing list manager that runs in perl and can be set up easily (preferably web interface). So that eliminates mailman. Thank you. prem -- MikeBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

mailing list manager in perl

2004-04-26 Thread Prem Vilas Fortran M. Rara
I'm looking for a very good mailing list manager that runs in perl and can be set up easily (preferably web interface). So that eliminates mailman. Thank you. prem = [Prem's blog] http://www.premrara.com __ Do you Yahoo!? Yahoo! Phot

RE: Controlling bottom posting in outlook

2004-04-26 Thread Bob Showalter
Price, Jason (TLR Corp) wrote: > ... Is > there a utility available that would allow me to bottom post only on > messages I choose? A right click option for bottom posting would be > ideal - anyone know of a utility that can do this? Outlook-QuoteFix can be configured to only reformat wh

undefined subroutine with recursives uses

2004-04-26 Thread 3li.marion
I encounter a very strange problem with interactions between main program and several modules. If there is no interaction between modules (module1 calling module2 and module2 calling module1) there is no problem with any sub each module. But if the mod1 uses 'use mod2' and mod2 uses 'use mod

Re: using Hash::Case and Storable

2004-04-26 Thread Wiggins d Anconia
> I'm using the Storable module to save and load a hash tree. I also want to use the > Hash::Case::Lower module to make my hash case insensitive. I can't figure out how to tie a > hashref to the Hash::Case::Lower module and load data into it with Storable. I tried > something like: > > use Hash

Re: Process folder structure into new structure

2004-04-26 Thread Rob Dixon
Bryan Harris wrote: > > I need to process one folder structure into a new folder structure, e.g. > replace the word "dog" with "cat" recursively down through a folder, writing > the updated files into a new structure: > > % ls > myfolder1 > % dog2cat myfolder1 > dog2cat: myfolder1 --> myfolder1.ca

OT: Controlling bottom posting in outlook

2004-04-26 Thread Price, Jason (TLR Corp)
I've sensed that bottom posting is considered proper etiquette for this mailing list. Using Outlook, this is obviously not the default reply behavior. I have seen a link to a utility that allows bottom posting in Outlook, but it replaces the default reply format for all messages. Being in a c

Re: Date problem

2004-04-26 Thread Alok Bhatt
Hi, Thanks everyone for the answer. So silly of me. Didnt check the docs :$ --- Patrick Heffernan <[EMAIL PROTECTED]> wrote: > > On Mon, 26 Apr 2004 06:07:03 -0700 (PDT) > Alok Bhatt hammered out: > > > I am facing this strange problem related to dates. > > When I print the date using the

Re: #include like in C

2004-04-26 Thread swoon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >There are 4 ways to do what you want. The closest is probably 'do' > >perldoc -f do > >I would recommend the module approach as has already been suggested: > >perldoc -f use >perldoc -f require So far, "do" is looking like the best thing for the job.

Re: Date problem

2004-04-26 Thread Patrick Heffernan
On Mon, 26 Apr 2004 06:07:03 -0700 (PDT) Alok Bhatt hammered out: > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > >

Re: Date problem

2004-04-26 Thread John W . Krahn
On Monday 26 April 2004 06:07, Alok Bhatt wrote: > > Hi All, Hello, > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > >

Re: Date problem

2004-04-26 Thread Beau E. Cox
On Monday 26 April 2004 03:07 am, Alok Bhatt wrote: > Hi All, > > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > > bash-2

Date problem

2004-04-26 Thread Alok Bhatt
Hi All, I am facing this strange problem related to dates. When I print the date using the system's date command, it prints correctly. But when I do the same using localtime, it shows the month as wrong (1 month previous. bash-2.03$ perl -e '@a=localtime; print "@a\n"' 18 4 8 26 3 104 1 116 0

Re: OOPS!!

2004-04-26 Thread Jan Eden
Sumanth Sharma wrote on 26.04.2004: >Hi All, > >I am quite ok with perl. But How do i learn Object oriented perl. > >It's so different from C++ of Java. I sort of went thro the perlboot. > >It looks not too friendly. > >How best can I learn Object orientd perl. Randal Schwartz: Le

Re: run function inside script on internal schedule?

2004-04-26 Thread JupiterHost.Net
Thanks Wiggins and Scott for the info. I'll take a gander at the info you pointed out. I agree its probably over kill but I was curious about it simply for grins :) So I'll use your references and see what I can figure out... Thanks Lee.M - JupiterHost.Net -- To unsubscribe, e-mail: [EMAIL PR

Running CD record on Linux and capturing the output....

2004-04-26 Thread Hamish Whittal
Hi All, I know about using the backticks and the system command and the 'open' command, but I really need the output of the cdrecord command in Linux. Problem is, it's one of those silly "interactive" tools that prints something to the screen, then writes over it, and does this again and again. I

Re: OOPS!!

2004-04-26 Thread Gabor Urban
Hi, Perl object are a bit different. My idea would be to write a small object on your ouwn, and expereince with it. There is no other 'royal' road.. Gabaux Linux is like a wigwam: no gates, no windows, and an apache inside! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

OOPS!!

2004-04-26 Thread Sumanth Sharma
Hi All, I am quite ok with perl. But How do i learn Object oriented perl. It's so different from C++ of Java. I sort of went thro the perlboot. It looks not too friendly. How best can I learn Object orientd perl. Thanks in advance, Sumanth Sharma

Re: Set $Log::TraceMessages::On at module file level

2004-04-26 Thread Claude
I'll try to re-phrase my question, as I didn't get any answer: How can I set to "local" a globally defined variable, in order to get file scope in a module file? -- Claude -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: run a function every so often *inside* the script automatically...

2004-04-26 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dan - Cpanel Support) writes: >Hello list! > >On a sleepless Friday night/Saturday morning a question cam to mind and >I had to ask... > >Assume I have a script that will run for 10 seconds. > >Is it possible to have a function executed every 2 s

parsing written language

2004-04-26 Thread Andrew Gaffney
Is there a module out there that could aid me in parsing written English? I've searched CPAN, but I didn't find anything that seemed to be relevant. -- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,