Langa Kentane wrote:
> Greetings,
> I wish to use the fork() function on one of my scripts. I would like more
> clarity on the way it works.
>
> Take for instance the ff code:
>
> Sub mysub
> {
> while ()
> If ($_ eq "SCANME")
> {
> fork()
After the fork c
On Thu, 2002-06-20 at 23:30, Langa Kentane wrote:
> Greetings,
> I wish to use the fork() function on one of my scripts. I would like more
> clarity on the way it works.
>
> Take for instance the ff code:
>
> Sub mysub
> {
> while ()
> If ($_ eq "SCANME")
> {
> fo
On Thu, 2002-06-20 at 22:42, Shishir K. Singh wrote:
> Hi,
hi
>
> I need to format a string in a fixed width field. The string may be less than the
>length of the format, or may be greater. If less, then it should get padded with
>spaces (left or right justified , like using - in sprintf), if
Javeed --
Is there a particular reason you sent your note to Shishir directly?
I've removed him from the Cc: line in case that matters...
...and then Javeed SAR said...
%
% Hi,
Hello!
%
% I am a begginer in perl?
% i have a doubt.
Welcome :-)
%
% when i create a file it should not hav
Greetings,
I wish to use the fork() function on one of my scripts. I would like more
clarity on the way it works.
Take for instance the ff code:
Sub mysub
{
while ()
If ($_ eq "SCANME")
{
fork()
system("nessus" "thathost");
Hi,
I am a begginer in perl?
i have a doubt.
when i create a file it should not have space bar in it's file name;
eg help file
if it is there it should not create the file, it should throw a error
message "space in file name not allowed"
can u help me in this.
regards
javeed
Try testing for the length of the string and then using the substr()
function to get the part that you want for strings that are longer than
desired.
-Original Message-
From: Shishir K. Singh
To: [EMAIL PROTECTED]
Sent: 6/20/02 10:42 PM
Subject: Formatting
Hi,
I need to format a stri
You can build the format string:
my $myVar = 'ABCD'; #(Left Aligned, padded with spaces)
#$newVar = sprintf("%-10s,$myVar);
#$newVar should have 'ABCD '; # Works
while ( 1 ) {
printf "eft or ight: ";
chomp(my $MyInput = );
last if ( $MyInput =~ /^ex/i );
my $MySign = '-'
Hi,
I need to format a string in a fixed width field. The string may be less than the
length of the format, or may be greater. If less, then it should get padded with
spaces (left or right justified , like using - in sprintf), if greater, then the
string should get truncated to the exact len
browse through www.cpan.org for some modules. I once used a module that
allowed to send mime encoded emails along with attachments. I cant
remember the module name.
On Thu, 20 Jun 2002, Troy May wrote:
> Hello,
>
> I need to know if I can send an attachment along with an email. I'm using
> S
Zentara wrote:
>
> Hi,
Hello,
> I'm starting work on my own virus scanner.
>
> I tried File::Scan and was getting some sort of error, so
> please don't tell me to use it.
>
> I started looking into the virus signature list at
> openvirus.org, it looks something like this.
>
> .
> VCS
Gary Stainburn wrote:
> On Thursday 20 June 2002 3:56 pm, Gary Stainburn wrote:
>
> open(FIN,"<$fname.pdf") || &dodie("cannot access PDF: $!\n";
> print "Content-Type: text/html\n\n";
> while (sysread FIN, $buffer, 4096) {
> print $buffer);
> }
> close FIN;
>
This is how to do it.
Todd W.
Hi,
I'm starting work on my own virus scanner.
I tried File::Scan and was getting some sort of error, so
please don't tell me to use it.
I started looking into the virus signature list at
openvirus.org, it looks something like this.
.
VCS=b90f0489feac32c4aae2
Just a list of
The mailer was implying that you have
my $dir = 'c:\xxx\xxx';
where this has your directory location
Wags ;)
-Original Message-
From: Auernheimer, Rebecca (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, June
When I tried:
my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/} readdir DIR;
I got this message:
Global symbol "$dir" requires explicit package name at
C:\perl\practice\test.pl line 5.
Execution of C:\perl\practice\test.pl aborted due to compilation errors.
I was going to ask about $dir
On Thursday, June 20, 2002, at 03:03 , Auernheimer, Rebecca (CORP,
Consultant) wrote:
[..]
> my @filelist = grep { $_ ne -d && m/^\d\d\d(\d|\d\d)\d$/ }, readdir DIR;
>
another close but no cigar you might try
my @filelist = grep { /^\d{5,6}$/ && -f "$baseDir/$_" } readdir DIR ;
The basic illu
Naser Ali wrote:
>
> Hello Every one,
Hello,
> I have attached the samples of the text files from which I am trying to
> search and compare certain pattern along with the code. I f you look at the
> text file, you will see that from the first sample, there is time value on
> line number 2,3,8,
on Thu, 20 Jun 2002 22:29:45 GMT, David Wagner wrote:
> But unless you have done a chdir it will only pass the file name or
> directory name and not do what you want.
You are absolutely right. The line should read:
my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/} readdir DIR;
whe
But unless you have done a chdir it will only pass the file name or
directory name and not do what you want.
Wags ;)
-Original Message-
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 15:31
To: [EMAIL PROTECTED]
Subject: Re: filter list of files fro
on Thu, 20 Jun 2002 22:03:04 GMT, wrote:
> So far, I am just trying to read a directory
> of files into an array, but only those files that are named with 5 or
> 6 numbers and no extension, like 12345 or 654321. I've got that part
> down except that I don't know how to keep another directory ou
Could add the:
grep m/^\d\d\d(\d|\d\d)\d$/ && ! -e "c:\\prod\\rej" . $_ , readdir DIR;
You need to have the directory location because the readdir returns
only the file or directory name read.
Wags ;) ps Did test and put out files only.
-Original Message-
From: Auernhei
Hello List,
I am working on my first "real" Perl program. I am using Active Perl 5.6 on
Windows NT/2000. So far, I am just trying to read a directory of files into
an array, but only those files that are named with 5 or 6 numbers and no
extension, like 12345 or 654321. I've got that part down
On Thursday, June 20, 2002, at 02:02 , Nate Brunson wrote:
> is there a way I can get Net::SMTP to return errors that it might
> encounter into a variable, or something?
> so that on the page that pops up after the mail is sent, it can display
> errors if there were any. I have read the man p
"passed" ? :- )
Thanks a lot ! You 've reminded me a question that I ever
wanna ask but ever forget to ask... Is that any Certificate
Exam for qualify on the standard of Perl ?
Smiley Connie =)
- Original Message -
From: "Felix Geerinckx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
On Thursday, June 20, 2002, at 01:45 , Connie Chan wrote:
>
> 1. A list of full pure perl syntax, with usage description and example.
> 2. Like Javascript.com does ( A short sample code for a certain purpose.
> )
> 3. Perldoc in Chinese =)
My general Stack of things about Perl Documentation is
on Thu, 20 Jun 2002 20:45:09 GMT, Connie Chan wrote:
> I am going to find some sites for further study Perl... I just found
> that I still in the kid level as a Perl programmer... So, would
> anybody give me some suggestion on the site for :
>
> 1. A list of full pure perl syntax, with usage de
On Jun 21, Connie Chan said:
>Why CGI.pm ? What difference ? =)
Because CGI does it right. It's easy to do it wrong. Very wrong, very
easily.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.
on Thu, 20 Jun 2002 20:37:32 GMT, Connie Chan wrote:
> Why CGI.pm ? What difference ? =)
Because it already contains all logic to parse *all* standards conforming
query-strings, not only your special case.
Soon you may want to work with an html-form instead of appending the query
string to a U
Hi all,
I am going to find some sites for further study Perl... I just found that
I still in the kid level as a Perl programmer... So, would anybody give
me some suggestion on the site for :
1. A list of full pure perl syntax, with usage description and example.
2. Like Javascript.com does ( A
Why CGI.pm ? What difference ? =)
- Original Message -
From: "Felix Geerinckx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 1:54 AM
Subject: Re: Would it be simpler ?
> on Thu, 20 Jun 2002 17:27:35 GMT, Connie Chan wrote:
>
> > Hi all, I am now making a bo
Thanks a lot Japhy, that's exactly the key I want =)
Assign the value at first, replace it when match...
That's very great !!!
Smiley Connie =)
>
> sub getQuery {
> my %ret = (
> user => 'system',
> book => 'index',
> page => 0,
> );
>
> my $query = shift or ret
Joao Silva wrote:
>
>Why should use CGI with Perl instead of ASP???
>
This is sort of like asking why should I eat an apple instead of an orange.
Maybe you dont have an apple, maybe you dont like apples, or maybe you dont
mind apples too much, its just that you are a little more farmilia
On Thursday, June 20, 2002, at 09:01 , Jeff 'japhy' Pinyan wrote:
> [NOTE: this is a reply to a SATIRE, so don't wig out]
You should have warned me that there was a clear defect
in the _info model but I have fixed the document
and have demonstration code up
http://www.wetware.com/drieux/pbl/bl
on Thu, 20 Jun 2002 12:41:34 GMT, Martin A. Hansen wrote:
> i will elaborate the question:
>
>
> i have a huge script with many global variables and subroutines.
>
> several variable names are reused, but lexically scoped to
> subroutines and everything works fine.
>
> but if you forget (bug
--- drieux <[EMAIL PROTECTED]> wrote:
> hence
> $globals{var1} - scalar variable
> $globals{var1_a}- array variable
> $globals{var1_h}- hash variable
> $globals{var1_s}- sub variable
> $globals{var1_ar} - reference to an array va
On Thursday, June 20, 2002, at 10:55 , Joe Echavarria wrote:
> Hi there,
>
> I have alredady installed Perl for Solaris 2.6 and
> when i try to use the "perldoc" help i get this error:
>
> root>perldoc -f print
> Superuser must not run /usr/local/bin/perldoc without
> security audit and taint
on Thu, 20 Jun 2002 17:55:00 GMT, Joe Echavarria wrote:
> I have alredady installed Perl for Solaris 2.6 and
> when i try to use the "perldoc" help i get this error:
>
>root>perldoc -f print
> Superuser must not run /usr/local/bin/perldoc without
> security audit and taint checks.
>
> Ho
On Wednesday, June 19, 2002, at 09:57 , Timothy Johnson wrote:
[..]
> But just for
> the sake of argument, here's one approach:
On a more serious note, you cats may want to try
perldoc -m Getopt::Std
and walk through what is in the code - since it
has a really nice structure of the for
On Jun 21, Connie Chan said:
>sub getQuery {
> my $queryStr = @_; my %ret;
You mean:
my ($queryStr) = @_;
or
my $queryStr = shift;
or
my $queryStr = $_[0];
> if (! $queryStr) { $ret{user} = 'system' ; $ret{book} = 'index' ; $ret{page} =
>0 }
> else {
>( $ret{user}, $ret
Hi there,
I have alredady installed Perl for Solaris 2.6 and
when i try to use the "perldoc" help i get this error:
root>perldoc -f print
Superuser must not run /usr/local/bin/perldoc without
security audit and taint checks.
How can i fix it ?, what i need to do?
Thanks,
Joe Echav
on Thu, 20 Jun 2002 17:27:35 GMT, Connie Chan wrote:
> Hi all, I am now making a bookshelf program with perl.
> At this very beginning, I do wonder if the below script
> can be simpler or not...
>
> [code snipped]
Please don't do this: use CGI.pm instead:
#! perl -w
use strict;
At 09:01 AM 6/20/02 +0200, Damir Horvat wrote:
>Hi!
>
>I've been trying to keep this thingie going with this sub, but it dies on
>me every now and then ...
>
>or, does someone have a full-featured daemon code|sub?
% perldoc -q daemon
Found in /opt/perl/lib/5.6.1/pod/perlfaq8.pod
How do I fo
At 02:41 PM 6/20/02 +0200, Martin A. Hansen wrote:
>i will elaborate the question:
>
>
>i have a huge script with many global variables and subroutines.
>
>several variable names are reused, but lexically scoped to subroutines
>and everything works fine.
>
>but if you forget (bugs do occur!) to d
Hi all, I am now making a bookshelf program with perl.
At this very beginning, I do wonder if the below script
can be simpler or not...
sub getQuery
{my $queryStr = @_; my %ret;
if (! $queryStr) { $ret{user} = 'system' ; $ret{book} = 'index' ;
$ret{page} = 0 }
else
Hello all,
I have a hash with the key being the field name and the value being the
order in which the field is to be displayed.like below:
%order = (
DATE => '1',
CPP => '2',
ESN => '3',
BTS => '4'
);
I'm receiving an array that would look somethi
On Jun 20, Kevin Old said:
>I have a hash with the key being the field name and the value being the
>order in which the field is to be displayed.like below:
>
>%order = (
> DATE => '1',
> CPP => '2',
> ESN => '3',
> BTS => '4'
> );
>
>I'm receiving an array t
Hello all,
I have a hash with the key being the field name and the value being the
order in which the field is to be displayed.like below:
%order = (
DATE => '1',
CPP => '2',
ESN => '3',
BTS => '4'
);
I'm receiving an array that would look somethi
The "GetMultiOpts(\@eArray)" passes a reference to an array to the
GetMultiOpts sub so that it knows which array to put the arguments in. Once
it is invoked, it puts any arguments it finds into the array passed to it
until it hits another switch, then it passes control back to the first loop.
W
On Wed, 19 Jun 2002 17:37:44 +0200 (MESZ),
[EMAIL PROTECTED] wrote:
>Hello!
>
>I still have problems with my script.I can't really figure out what's
>wrong with it.
1 thing for sure, if you "use CGI"; you don't need the old
ReadParse routine.
if ($ENV{'REQUEST_METHOD'} eq 'POST')
{
On Jun 20, Balint, Jess said:
>Are these -l and -n flags specific to perl 5.6? I am using 5.005 and they
>don't work as illustrated:
The -l and -n flags have been with Perl for quite some time.
>% perl -e 'while{print if(.45909592993094279021 < rand);}' db_mlb_undup.dat
Uh, you're missing some
Timothy Johnson <[EMAIL PROTECTED]> writes:
> sub GetMultiOps{
> $ref = $_[0];
> while($ARGV[0] !~ /^-\w$/){
> $_ = shift @ARGV;
> push @{$ref},$_;
> }
> }
>
> ### END #
>
> Which should theoretically give you one array for each option and one array
> as a cat
On Thursday, June 20, 2002, at 09:01 , Jeff 'japhy' Pinyan wrote:
> [NOTE: this is a reply to a SATIRE, so don't wig out]
what? you mean it's not a good basis for a 4/1 RFC standard???
> On Jun 20, drieux said:
>
>> my %globals; # where we hide all our globals
>> #
> -Original Message-
> From: Gary Stainburn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 12:11 PM
> To: Bob Showalter; [EMAIL PROTECTED]
> Subject: Re: cat binary file
>
> ...
> The point was that I was doing this at the end of a quite
> long perl script,
> and wanted to d
on Thu, 20 Jun 2002 15:15:32 GMT, Drieux wrote:
> It just struck me that there are many ways to
> make bad coding habits more effective.
>
> Folks EITHER need to get out of the habit of
> using a bunch of globals - or become more
> effective at the process.
>
> To this latter end I offer this s
Hi Bob,
On Thursday 20 June 2002 4:38 pm, Bob Showalter wrote:
> > -Original Message-
> > From: Gary Stainburn [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 20, 2002 10:57 AM
> > To: [EMAIL PROTECTED]
> > Subject: cat binary file
> >
> >
> > Hi all,
> >
> > I know this is a FAQ, but
Are these -l and -n flags specific to perl 5.6? I am using 5.005 and they
don't work as illustrated:
% perl -e 'while{print if(.45909592993094279021 < rand);}' db_mlb_undup.dat
syntax error at -e line 1, near "while{"
Execution of -e aborted due to compilation errors.
% cat db_mlb_undup.dat | per
Why should use CGI with Perl instead of ASP???
JP, from Brazil
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
--
To unsubscribe, e-mail: [EMAIL PRO
On Thursday 20 June 2002 4:34 pm, David T-G wrote:
> Gary --
>
> ...and then Gary Stainburn said...
> %
> % On Thursday 20 June 2002 3:56 pm, Gary Stainburn wrote:
> % >
> ...
> % > What's the best way to cat a binary (file with non-display chars) to
> % > STDOUT?
> ...
> % open(FIN,"<$fname.pdf")
58 matches
Mail list logo