Re: change directories

2002-09-09 Thread Dharmendra Rai
perldoc -f chdir __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: change directories

2002-09-09 Thread Dharmendra Rai
perldoc -f chdir __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Strange error

2002-09-06 Thread Dharmendra Rai
Then there is no problem :) Thanx __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: Strange error

2002-09-06 Thread Dharmendra Rai
well perlregxp( perl regular experssion which i wrote clearly) stands for 'perlre. __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAI

Re: Strange error

2002-09-06 Thread Dharmendra Rai
sorry __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: like an exe file

2002-09-06 Thread Dharmendra Rai
Hi, Perl2Exe is a command line utility for converting perl scripts to executable files.This allows you to create stand alone programs in perl that do not require the perl interpreter. You can also ship the executable file without having to ship your perl source code. Perl2Exe can generate executa

Re: like an exe file

2002-09-06 Thread Dharmendra Rai
on unix u can use perlcc. __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: Strange error

2002-09-06 Thread Dharmendra Rai
go to www.perldoc.com/perl5.8.0/pod/perl.html and read "perlre" __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: get a list into array from a remote machine

2002-09-06 Thread Dharmendra Rai
try the execution of that block in eval (). __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Re: Strange error

2002-09-06 Thread Dharmendra Rai
man perlregxp __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Strange error

2002-09-05 Thread Dharmendra Rai
Hi Read Perl regular expressions. Dharmender Rai __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: getting an intersection between two arrays....

2002-09-05 Thread Dharmendra Rai
could you please mail an example so that your query become clearer. do you have any criteria for distinguishing between the bad and good ones. if yes, then use that to get the "bad elements" from href . well your example can make the question clearer.

Re: Attributes of files on SMB shares

2002-09-05 Thread Dharmendra Rai
On Linux , open /etc/smb.conf and set the attributes there. It is basically for setting the attributes for printers etc. But every thing is file on linux so you can do it. __ Do You Yahoo!? Everything you'll ever need on one web page from News and

Re: Hash of Hashes woes...

2002-09-05 Thread Dharmendra Rai
Pass the keys($dom,$eng...) by ref. All you are doing is passing the array by reference which has a copy of your keys. - Get a bigger mailbox -- choose a size that fits your needs.

Re: OT - Interesting Perl output; What is it?

2002-09-05 Thread Dharmendra Rai
Number is say XY then u can write it as 10X+Y. Now you are doing 10X+Y - (10Y+X) which is 9(X-Y) where X and Y lie between 0 and 9 . when X >Y you get multiples of 9 in increasing order and when X

Re: converting a list into array

2002-09-04 Thread Dharmendra Rai
Earlier you were reading from no where. In later case you started reading using the file handle. - Get a bigger mailbox -- choose a size that fits your needs.

Re: avoid creating directories in a particular path

2002-09-04 Thread Dharmendra Rai
yeah, but it came after mine was posted on the list. - Get a bigger mailbox -- choose a size that fits your needs.

Re: avoid creating directories in a particular path

2002-09-03 Thread Dharmendra Rai
This will not work as it will also forbid creating new files(according to the question only sub-DIRS r not allowed) in that directory. There is no Unix-provided solution for this. One can write a function, which can be called first in any perl code (related to some task in that path) to ensure

Re: general confusion...

2002-09-03 Thread Dharmendra Rai
yeah u r right. - Get a bigger mailbox -- choose a size that fits your needs.

Re: CGI+Compiled Program

2002-09-03 Thread Dharmendra Rai
The file generated by 'perlcc' does the same task as the perl file. In the program where you are requesting the service, change the name from perl file(which was earlier to 'perlcc') to the generated binary file. - Get a bigger mailbox -- choose a size that fi

Re: Include command???

2002-09-02 Thread Dharmendra Rai
1. require PACKAGE_NAME; 2. use PACKAGE_NAME; 3. do "perl_file.pl"; 4. eval "cat perl_script_file.pl"; - Get a bigger mailbox -- choose a size that fits your needs.

Re: AW: find the lowest number?

2002-08-30 Thread Dharmendra Rai
why use sorting and other algos which have non-linear time-complexity. traverse the array once and get the max and min - Get a bigger mailbox -- choose a size that fits your needs.

Re: AW: find the lowest number?

2002-08-30 Thread Dharmendra Rai
my $ret_val; my $i; if ($#your_array < 0){ ## do appropriate thing } elsif ($#your_array == 0){ ## return the only value it has} ## following is the ELSE part for (my $i = 0; i < $#your_array; ++i) { $ret_val = your_array[i+1]; $ret_val = your_array[i] if (your_array[i] > your_array[i+1

Re: uniq elements of an array

2002-08-30 Thread Dharmendra Rai
have u seen the values in @unique when @all_elements contains (1,2,3,1,2) when u apply @unique = grep { !$seen{$_}} @all_elements ??? its is not working - Get a bigger mailbox -- choose a size that fits your needs.

Re: Need help

2002-08-29 Thread Dharmendra Rai
use $a{ur_key}->[Index] - Get a bigger mailbox -- choose a size that fits your needs.

Re: make an executable File / compile perl

2002-08-27 Thread Dharmendra Rai
use perlcc - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

RE: generating arrays on the fly

2002-08-27 Thread Dharmendra Rai
Hi , The name of the global var is put into symtab during compilation while that of local var is converted to its offset. So if u want to "NAME" a var at run-time, u won't succeed. All u can do is that use hash-table with the KEYNAMES as those words appearing in the file. Read about the th

Re: AW: use Variable as a hashname?

2002-08-26 Thread Dharmendra Rai
u r right felix. that was a typing error. nothing else. sorry for that - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: AW: use Variable as a hashname?

2002-08-26 Thread Dharmendra Rai
use foreach keys (%ur_hash_table) - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: use Variable as a hashname?

2002-08-26 Thread Dharmendra Rai
hi , %my_hash=("f', 1, "s", 2, "t", 3); ### Take its reference $my_ref=\%my_hash; print $$my_ref{"f"}, "\n"; ### Here u r printing the value associated with key "f" of the hash-table using the ref #of that hash-table and refs r always scalar - Get

Re: use Variable as a hashname?

2002-08-26 Thread Dharmendra Rai
Connie, the query was abt ref of a hash . - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: AW: use Variable as a hashname?

2002-08-26 Thread Dharmendra Rai
use foreach keys(%ur_hash) { do something; } - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: Help parsing a large file

2002-08-21 Thread Dharmendra Rai
Max, use the following algo for ur work: create 2 hash-tables for good and bad addresses. the keys are the domain part of the e-mail addresses. the value part is the reference to an array of id part of the e-mail address. instead of reading data into ur GOOD and BAD fd's , read t

RE: newbie question

2002-08-20 Thread Dharmendra Rai
hi , that's correct . $| can have only 2 values. either 1 or 0. its undocumented but the behaviour is same everywhere. - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: inserting a single word in every file

2002-08-20 Thread Dharmendra Rai
nandita, go to the point where u want to insert the word. read the file from that point to EOF in a scalar/array variable . write ur word there in the file. and after that write the contents of the variable back intp the file. - Get a bigger mailbox -- c

Re: another reg needed

2002-08-18 Thread Dharmendra Rai
well i think the following is general @my_array = /(\d+)/g ; # is much much better. thanx - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

RE: ascertain current username

2002-08-16 Thread Dharmendra Rai
hi, use system('users') on unix systems to get the name of all users currently logged on that machine. u can also use system('whoami') to know from whose login the script is being executed (i.e. u urself). - Get a bigger mailbox -- choose a size that fits

Re: BEGIN statement in Perl?

2002-08-15 Thread Dharmendra Rai
hi, use of BEGIN is better because it is called by perl-run-time before ur program gets executed and if u have a large chunk of variables to be initialized in this way, it is the best way. - Get a bigger mailbox -- choose a size that fits your needs. http

static variables and sub-routines with file-scope (like C) in Perl

2002-08-15 Thread Dharmendra Rai
hi, You may declare my variables at the outermost scope of a file to hide any such identifiers from the world outside that file. This is similar to C's static variables when they are used at the file level. To do this with a subroutine requires the use of a closure (an anonymous function th