Enyone can help me:
how to do Quicksort , selection sort ,mergesort and
external merge sort in perl that programes are exactly the same way that
programes in C/C++
--
#
--- Mark Ross <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm wondering if there is a difference between:
>
> $foo{'bar'}
> and
> $foo{bar}
>
> Is there any important difference? I prefer to use
> single quotes (my editor handles color coding better
> that way), but in examples I see from the list
Hello Ronald,
Friday, January 11, 2002, Yacketta, Ronald <[EMAIL PROTECTED]> wrote:
YR> No takers on my minor request for help from the guru's?
don't know about gurus, but i feel something very strange about your code.
please show rest of your code and tell, what this code should do for
you. i'
open (infile, "<>snert.cgi");
^^
Use single '>'.
open (infile, "snert.cgi");
[sathish]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Any site that provides details on the different command line switches?
Regds,
- NP
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
> No takers on my minor request for help from the guru's?
Give us time! It is, however, bad email etiquette to
demand help especially through a follow up. People give
their assistance without payment or financial reward. They
like to help others, and join in with challenges.
I enjoy trying to
Hi dear team!
Suppose I open the file looks like this
Nov 1 2000 Page 1
UID LOGIN_NAME CPU_PRIME
0 root18
2 uucp1
4 giles 11
..
..
..
Nov 1 2000 Page 2
COMMAND NUMBER_CMDS
bbkar256
..
..
How I assign UID, LOGIN_NAME and CPU_PRIME as the
index array. And I hav
My head hurts. I am trying to build a Perl script to decrypt/encrypt some information.
I have some test information for the project.
Here is what I know about the data I need to decrypt:
Algorithm - The block cipher DES is the standard cipher for all encryption/decryption
operations.
Padding -
Hi all,
I'm wondering if there is a difference between:
$foo{'bar'}
and
$foo{bar}
Is there any important difference? I prefer to use
single quotes (my editor handles color coding better
that way), but in examples I see from the list, etc.
folks don't seem to use them. Is there a reason why I
sh
At 12:18 PM 1/11/2002 -0800, Scott Lutz wrote:
>I am curious if anyone is familiar with a way to tighten security on
>this script?
>We am experiencing some sort of script that is exploiting this code, and
>am looking for some previous experience here . .
>
>please
Is this the script available fro
I am curious if anyone is familiar with a way to tighten security on
this script?
We am experiencing some sort of script that is exploiting this code, and
am looking for some previous experience here . .
please
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free:
--- Scott Lutz <[EMAIL PROTECTED]> wrote:
> I am curious if anyone is familiar with a way to tighten security on
> this script?
> We am experiencing some sort of script that is exploiting this code, and
> am looking for some previous experience here . .
>
> please
>
> Scott Lutz
Assuming that
Hi-
I was wondering if anyone had an example of usage for
the Net::HTTPTunnel module. I can not quite get this
module to work for me and I'm thinking if I saw a
successful usage I would be able to use it...
Thanks!!
__
Do You Yahoo!?
Send FREE v
Question 1: Is there an archive of past postings available? Would keep me
from asking too many "really basic" question like the next one.
Question 2: Is there a way to get line numbers printed on a script? For
short scripts, compiler error messages for "Line n" aren't too hard too
find, but a
zentara wrote:
> On Fri, 11 Jan 2002 04:39:05 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote:
>
> >Zentara wrote:
> >
> >> I've been playing with File::Basename and
> >> the docs are not absolutely clear on whether
> >> you can get an extension on a linux system.
> >> I have had no success trying
No takers on my minor request for help from the guru's?
-Ron
> -Original Message-
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 09:14
> To: Beginners (E-mail)
> Subject: Code clean up help PLEASE
>
>
> Folks,
>
> I have received a ton of use
Michael,
Thanks for your help! I'll bet that you have identified the problem, and
I'll do some testing to confirm it. Unfortunately, the "ignore such
files..." option won't help very much, since the point of my code is to
identify those very files, so I guess I'll have to take the recompile
ro
On Fri, 11 Jan 2002, Hanson, Robert wrote:
> Hashes are slower than arrays, but I don't usually worry about those things
> unless performance is an issue. I recommend (others will no doubt have
> different opinions) that you use a hash when it makes your life easier... in
> this case it might not
On Fri, Jan 11, 2002 at 10:57:48AM -0600, [EMAIL PROTECTED] wrote:
> all files (including the previously missed ones) are printed out (also
> along with the directories now) as expected, but for the files that would
> not have passed the (-e $_) test, the values assigned for filesize and age
> in
Thanks! In this case, at least, there aren't any symbolic links to worry
about.
"Tanton Gibbs"
On Fri, Jan 11, 2002 at 06:24:33PM +, Prahlad Vaidyanathan wrote:
> I'm guessing this has to do with how long it takes to invoke sudo (given
> system load, etc).
It does.
> But, all the same, shouldn't it wait for the password to be entered
> _before_ printing 'test' ? Now I'm totally stump
You can place "require" anywhere you want. If you use "require" inside a
sub it will be the same as if you placed it at the top (except for the fact
that the subs in the file won't be available until you "require" it).
Rob
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTE
Nick D Montpetit wrote:
>
> Hi Everyone!
Hello,
> I'm fairly new to Perl, and completely new to submitting to the list, so
> please be easy on me. :-)
I'll try.
> The purpose of the code I wrote (listed below) is to go through the current
> directory and all of its subdirectories and report
On 11 Jan 2002 14:06:56 +0100, [EMAIL PROTECTED] (Morgan Norell) wrote:
>Hi
>
>I have a passwd file for my ftp users.
>I have written a script to add users but I have problems when I'm about
>to add a uppdate function to the script.
>
>Does anyone have a tip how to read the passwd file and update
I meant to post my original code, where line 11 used the -f file test (so
that directories wouldn't be included in the output). My questions still
apply when using -f instead of -e. If we could refer the email below for
future discussion, that would be great! Sorry about the screwup. :-)
Than
--- "WANG, SHIPING [AG/1000]" <[EMAIL PROTECTED]> wrote:
> Hi, Question for your code:
>
> what is the meaning "require 5;"
Require with just a version number means that you must be running Perl 5 or better.
For example,
let's say I was to use the 'our' keyword. That was introduced in 5.6,
Bob Showalter
,
white.com>
Hi, Question for your code:
what is the meaning "require 5;"
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 28, 2001 3:54 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Question!! number of line
require 5;
sub get_line_
Something I just found via a google search...
foreach (@_) {
$min = $_ if $min > $_;
}
$min now holds the smallest value of the array.
BTW, shouldn't line 21 be write $fileref STDOUT? I've not gone over the
code, but if you are looking for the smallest array value, then only writing
out
> 8:
> 9: sub wanted{
> 10: my $flag = 0;
> 11: if (-e $_){
> 12: push(@filelist, [$File::Find::name, -s $_, -M $_]);
don't know if you need the -e here, it is redundant. you might want to use
-f test to just find and stat regular files. here is a snip from a script i
did and use alot and
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 11:58 AM
> To: [EMAIL PROTECTED]
> Subject: Help with File::Find
>
>
> Hi Everyone!
>
> I'm fairly new to Perl, and completely new to submitting to
> the list, so
> please be easy
$_ in the Find::File setup has only the filename. You need to check
$Find::File::name which holds the full filename.
Wags ;)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 08:58
To: [EMAIL PROTECTED]
Subject: Help with File:
I use require 'scripts/lib/pollstarpm' for often used functions in most of
my scripts. The question is this.. do I always have to declare "require"
near the top or can I "require" only when I need it? If so, what happens if
I "require" during a subroutine?
As always, many thanks.
Agustin Rivera
Hi Everyone!
I'm fairly new to Perl, and completely new to submitting to the list, so
please be easy on me. :-)
The purpose of the code I wrote (listed below) is to go through the current
directory and all of its subdirectories and report the filename, size and
age of the x largest files, where
On Fri, 11 Jan 2002 04:39:05 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote:
>Zentara wrote:
>
>> I've been playing with File::Basename and
>> the docs are not absolutely clear on whether
>> you can get an extension on a linux system.
>> I have had no success trying, so does this mean
>> that lin
On 11 Jan 2002 05:56:08 -, [EMAIL PROTECTED] (Kondreddy Rama Koti
Reddy) wrote:
>2) when i try to generate exe from .pl files with
>perllcc -o =0D=0AIt's giving the following error.
>
>
>/tmp/ccdiyw10.o: In function `xs_init':
>/tmp/ccdiyw10.o(.text+0x33b9): undefined reference to `boot_D
On Fri, 11 Jan 2002, Pieter Blaauw wrote:
> Hi guys
>
> How would I do the following. Platform is a Red Hat 7.2 Linux box with
> Pine 4.44 as my mail client. Now pine stores all your mail in the usual
> /var/spool/mail/
>
> Can I use perl to extract all the mail from 2001 into another big file
>
Frank McCollum wrote:
>
> I am not getting the Find Function. (FILE::FIND). I have found all of
> these great examples on the web describing how to use the find function
> under the following two conditions...
>
> 1) You know the exact File Name you are looking for, or you just want a
> list
"McCollum, Frank" wrote:
> I am not getting the Find Function. (FILE::FIND). I have found all of
> these great examples on the web describing how to use the find function
> under the following two conditions...
>
> 1) You know the exact File Name you are looking for, or you just want a
> list
Sorry,
This will return a true value even if the search string is embedded in another string.
index ("Hello World", "Wor") will return not return -1, eventhough that may not be
what you wanted.
Try
if ($string_from_file =~ m/\b$search_string\b/)
This may be the one you are looking for
hth,
Sudar
Yun yun wrote:
>
> How can I read a line from a file, and judge whether
> this line include some substr?
> Now I only can open(HANDLE," then how should I do?
#!/usr/bin/perl -w
use strict;
my $substr = 'something';
open HANDLE, ' ) {
# method 1
if ( /$substr/ ) {
# $substr is i
I am not getting the Find Function. (FILE::FIND). I have found all of
these great examples on the web describing how to use the find function
under the following two conditions...
1) You know the exact File Name you are looking for, or you just want a
list of every file in a directory
2) You
Use index (preldoc -f index).
index ($str_from_file, $search_string);
This will return a -1 if $search_string is not present in $str_from_file.
hth,
Sudarsan
> How can I read a line from a file, and judge whether
> this line include some substr?
> Now I only can open(HANDLE," then how should I d
On 10 Jan 2002 18:10:20 -0500, [EMAIL PROTECTED] (Michael R. Wolf)
wrote:
>[EMAIL PROTECTED] (Zentara) writes:
>
>> I get it, so "perl" equals 285075 in a base24 number
>> system, with the alphabet as it's units.
>
>24? What's 24? There are _26_ letters in the alphabet! Or
>was "24" a base _11
Hashes are slower than arrays, but I don't usually worry about those things
unless performance is an issue. I recommend (others will no doubt have
different opinions) that you use a hash when it makes your life easier... in
this case it might not, but that is up to you to decide. The only time I
How can I read a line from a file, and judge whether
this line include some substr?
Now I only can open(HANDLE,") is used for end of file or end of a line?
_
Do You Yahoo!? µÇ¼Ãâ·ÑÑÅ»¢µçÓÊ! http://mail.yahoo.com.cn
ÎÞÁÄ£¿ÓôÃÆ£¿¸ßÐË£¿Ã»ÀíÓÉ
Thank you to everyone on this list who has been most helpful and patient!
I was able to track down the Camel Book at a bookstore and I have not
stopped reading. I do have a question concerning list and hash and the
performance.
I am reading a file into a list and then formatting it to prepar
split() doesn't modify the variable being cut up. So if you split $_ it
will not be modified. chop() on the other hand does modify it's argument
(or $_ if no argument is given).
My guess is that you are seeing code like this, or something like it:
foreach $item ( split(/,/, $_) ) {
# do stu
Darren Simpson wrote:
>
> Hello all. I don't know if this is the right list to post to but i am a
> beginner in perl. we have a bsd unix distribution with perl 5. I am
> wondering if anyone knows of a decent whois function written in perl.
http://search.cpan.org/search?mode=module&query=whois
> -Original Message-
> From: Conor Lillis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 8:08 AM
> To: PERL Beginners (E-mail); Perl-Win32-Users (E-mail)
> Subject: Data manipulation problem
>
> ...
> # split @data1, to isolate the e-mail address from the name eg.
> [EM
Folks,
I have received a ton of useful info from the list.. a great deal of it of
late has gone to help me with my current project to automate (somewhat) a
testing procedure.
I have finally made my way to the final stage of the script.. execution of
the test.. I have the following (be for warned
> -Original Message-
> From: Marius Keraitis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 5:40 AM
> To: DBI Perl; Begginers Perl
> Subject: Column names and etc..
>
>
> Hi,
>
> I have a problem with getting colunm count and their names.
>
> I have to get the list of all
OK. I've been over all your code. Here is the way I would do this. N.B I've
not checked for errors or typos. It's commented to explain the changes.
Basically instead of having to grep the second file for every iteration of
the foreach loop, you initialize a hash with the data from the second file
- Forwarded by David Milstead/Raleigh/IBM on 01/11/2002 08:25 AM -
Ask Bjoern Hansen
Hello all. I don't know if this is the right list to post to but i am a
beginner in perl. we have a bsd unix distribution with perl 5. I am
wondering if anyone knows of a decent whois function written in perl.
Thank you in advance
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
Try changing to this.
printf "emaildata is $emaildata[0]";
$emaildata[0] is using the element in a scalar format
@emaildata[0] is using the element in an array format, which is converted to
scalar by perl when printing out in this case. The array only has the one
element [0]. When you take an ar
Hi
I have a passwd file for my ftp users.
I have written a script to add users but I have problems when I'm about
to add a uppdate function to the script.
Does anyone have a tip how to read the passwd file and update the
password field.
I use htpasswd to generate passwords now.
/Raven
--
Hi all,
hopefully someone can help me with this, I will describe my problem as best
as I can. I am opening 2 files, one has a list of NT account names, The 2nd
has a list of NT account names & e-mail addresses. I am trying to match an
NT account name from the first list to an e-mail address in the
I have a CGI program that use the Mail::Sendmail module. The
situation is that at the end of the script it send a email
notification with the Mail::Sendmail but because the
Mail::Sendmail check for the email address to see if its valid,
when the
user enter an invalid email address the modul
> I have tree view structure ,like directory structure in windows.
> Now I want to select and change the name of a particular sub
> Item under a
> item .
> How can I do this using perl ?
What GUI system have you written this in? Win32::GUI? wxWindows? Perl/TK?
Some detail would be necessary; s
Zentara wrote:
>
> Hi,
Hello,
> I've been playing with File::Basename and
> the docs are not absolutely clear on whether
> you can get an extension on a linux system.
> I have had no success trying, so does this mean
> that linux is not capable of dealing with extensions?
>
> As an example fro
Hi,
I've been playing with File::Basename and
the docs are not absolutely clear on whether
you can get an extension on a linux system.
I have had no success trying, so does this mean
that linux is not capable of dealing with extensions?
As an example from perldoc File::basename:
On Thu, 10 Jan 2002 [EMAIL PROTECTED] wrote:
Sorry for the OT, but I saw this email address and immediately went into
headers looking for a spammer. lmao Nice address.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi
I have tree view structure ,like directory structure in windows.
Now I want to select and change the name of a particular sub Item under a
item .
How can I do this using perl ?
Thanks in advice
Abhra
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
Hi guys
How would I do the following. Platform is a Red Hat 7.2 Linux box with
Pine 4.44 as my mail client. Now pine stores all your mail in the usual
/var/spool/mail/
Can I use perl to extract all the mail from 2001 into another big file
that I could use as a backup of last years mail. I have o
- Original Message -
From: <[EMAIL PROTECTED]>
> I already have a user registration form set up, but now I want to be able
to
> display the last 10 visitors which logged into my site.
What you can do is everytime a visitor logs in, it is captured into a file,
placing the last entry on to
Hi,
I have a problem with getting colunm count and their names.
I have to get the list of all tables in the users account (Oracle).
This I do by selecting * from cat.
Second step is to show every table contents (by clicking on link with table
name).
To do this I need to know how many columns is
> now, I am writing a script which to let user modify the
> password of their email account automatically, but our
> email server will encrypy the password in some ways...
> so it makes me unable to cmp or write.
This sounds like security through obscurity - which is
often considered worse than n
I regularly use a nice script, available here
http://www.liquidsilver.com/scripts, called Form2Mail. It's intended to
provide a generic interface to mail data from a web form.
It had a nice example of using sockets to send mail. This should be portable
between OSs as all mail code is done via a s
now, I am writing a script which to let user modify the password of
their email account automatically, but our email server will encrypy
the password in some ways. so it makes me unable to cmp or write.
such as, if I give "A" as a new pass, it encrypted as QQ== in the user's profile.
if I gi
I use perlcc to make a .pl file to the corresponding
*.exe file like this:
perlcc -o xxx xxx.pl
but it tells me three warnings, and then when I run
the xxx.exe directly, it says that produce some errors
in reading the ram. Why?
Do you make executable files through perlcc command?
Thanks!
__
In article <[EMAIL PROTECTED]>, Ahmed Moustafa wrote:
> Hi All,
>
> I'm calling a Java application using "system". How can I know the return
> code of the called Java application?
perldoc -f system
(...)
The return value is the exit status of the program as returned by the
"wait" call. To g
here are two ways:
my $exit_code = system ($cmd);
system ($cmd);
print "exit code = $?\n";
/Jon
Ahmed Moustafa wrote:
>
> Hi All,
>
> I'm calling a Java application using "system". How can I know the return
> code of the called Java application?
>
> Your help will be appreciated so much.
>
I'm not sure I really understand what you're after, i get the feeling
you're normaly using windows. If you set the mod to 755 (rwxrxrx) the
perlscript will be executable, there's no need t compile it with perlcc.
If it's speed you're after, you should use mod_perl instead
(perl.apache.org) as th
74 matches
Mail list logo