hi.
I am beginner too.dont worry .
it means:
when you want send or receive argument to function,
in perl this parameter shown with $,
for example :
foo(a,b,c);
a $1
b $2
c $3
and $# means all of arguments
-
Best regards.
Nafiseh Saber
On Sep 11, lyf said:
>hi, I am a perl beginner, and I am confused by $1.
>what does $1 ($2,and so on) mean?
>and how to use them?
The $DIGIT variables correspond to sets of ()'s in a regex. Here's an
example:
$pn = "1-800-555-1212";
if ($pn =~ /^\d-(\d)\d{2}-(\d{3}-\d{4})$/) {
print "t
hi, I am a perl beginner, and I am confused by $1.
what does $1 ($2,and so on) mean?
and how to use them?
thanks
yuefu li
Hi,
I need to work in PERL for a project. I am a DELPHI Programmer.
Any suggestions of the best XML parser to use for a real time
environment.
The messages will not exceed 1 Meg and will mostly be arround 150K.
Many thanks for your input.
Andy Sewell
--
To unsubscribe, e-mail: [EMAIL PROTEC
On Sep 11, baby lakshmi said:
>I am learning OOPs concepts. Can anyone tell me what is the real use of
>UNIVERSAL class(in built)?
The UNIVERSAL class offers three methods for every class: isa, can, and
VERSION. It also provides a place for you to write methods available to
every class.
>Als
hi all.
when I run cgi form that write with perl.
this error shown in error log of system :
malformed header from script. Bad header =---: /var/www/cgi-bin/
do you know why ??
thanks.
-
Best regards.
Nafiseh Saberi
Iran - Sh
Hi,
I want to pass some values to a cgi from another cgi
I try to do:
In CGI #1:
if ($validacion == 1) {
print <<'FINAL';
Prueba
http://localhost/cgi-bin/servidores.cgi?validado=1";>
FINAL
}
In CGI #2:
my $validado=@ARGV[0];
What I need to do is tell the second cgi that the u
Hi
I am learning OOPs concepts. Can anyone tell me what is the real use of
UNIVERSAL class(in built)?
Also i read that, Unless otherwise we invoke the constructors, it wont be
executed automatically.
Then what is the speciality of the constructor in Perl??
Any pointers in this regard will be
Hi Tim
You get perlapp when you use the perl development kit which I downloaded
from ActiveState (www.activestate.com). In the PDK you also get perlcom
which allows you to create com objects and another tool which allows you
to create services for windows. I use perlapp on windowsNT but I think
The +z and +Onolimit options are from the HP compiler. My guess would be someone
installed gcc as cc or created a link to gcc as cc. These options are not part
of the gcc compiler which is why when removed you are still having problems.
They used the HP compiler to build Perl is my guess.
D.
> "Ron" == Ron Smith <[EMAIL PROTECTED]> writes:
Ron> Is it just me, or does anyone out there notice that the example
Ron> subroutine on pg. 57 of "Learning Perl" (Third Edition) doesn't work,
Ron> as presented?
Ron> When written like:
Ron> snip--
Ron> #!/usr/
Thanks, everybody!! I've declared the $n variable outside the subroutine, as
suggested, and everything works fine :-).
Ron
>From: "Ron Smith" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Subroutine example
>Date: Mon, 10 Sep 2001 14:23:28 -0700
>
>Is it just me, or does anyone out there
I believe when you have
sub marine{
my $n
}
my is local to sub marine, so it is lost after each call of marine. Whereas
in the second example you have my $n outside of sub marine.
matt
Ron Smith wrote:
> Is it just me, or does anyone out there notice that the example subroutine
> on pg.
Is it just me, or does anyone out there notice that the example subroutine
on pg. 57 of "Learning Perl" (Third Edition) doesn't work, as presented?
When written like:
snip--
#!/usr/bin/perl -w
use strict;
sub marine {
my $n += 1; # Global variable $n
prin
I apologize for my unclear post... this will demonstrate what I mean:
#!/usr/bin/perl -w
use strict;
my $line = "";
while ()
{
if (/^(?! [Ldf] )
(?! LOG_INFO | dhcp | ftpd ) /x)
{
$line = $_;
}
}
print "and the magic line is:\n$line\n";
__DATA__
this is a line
he
Hello Ronald,
Monday, September 10, 2001, Yacketta, Ronald <[EMAIL PROTECTED]> wrote:
YR> I have the following benchmark line in my perl code
YR> my $etime = timeit(1, \&get_errors);
YR> more code
YR> printf OFN "egrep\t: %s\n", timestr($etime);
YR> is there a way to manipulate the timestr o
Jeremy Vinding wrote:
>
> }
> >
> > or if you want to be the quickest in the world, try:
> >
> > unless ($line =~ /^ (?! [Ldf] )
> > (?! LOG_INFO | dhcp | ftpd )
> > /x) {
> >
> ># line doesn't start with them
> > }
>
> I believe that would also catch lin
Folks,
(forgive the HTML email, my outlook is kinda whacking on me ATM)
I have the following benchmark line in my perl code
my $etime = timeit(1, \&get_errors);
more code
printf OFN "egrep\t: %s\n", timestr($etime);
is there a way to manipulate the timestr output? The function it calls has
Perl Group,
In Perl, is there any way can I change a password remotely on a unix
machine either by using rlogin or rsh?
Regards,
Rajeev Nalluri
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 08:49 AM 9/10/01 +0200, Dennis Breithaupt wrote:
>I'm searching for a script that makes it possible for a visitor of a
>webpage to upload a file from his system (windows i.e.) to the webserver
>(Apache on Linux maybe).
>
>Any ideas, URL's or sources for me?
There is copious code for several
one way I have done this in the past is
open(COM, "parse.pl |") || die("fork failed: \l$!\n");
while ( ) {
blah
}
close COM
> -Original Message-
> From: Sofia [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 13:21
> To: [EMAIL PROTECTED]
> Subject: Gathering outpu
I execute a program from within my script called
infoerr_parse.pl that produces some output that I need
to gather.
I have the following in my script:
:
:
@output = `infoerr_parse.pl`;
print LOG "@output\n";
Now, infoerr_parse.pl pings some machines and creates
the following output:
infoerr: inf
On Mon, Sep 10, 2001 at 04:29:02PM +0100, [EMAIL PROTECTED] wrote:
> dycdmp01 # make
>
> This produced the following output
>
> cc -c -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O +Onolimit
> -D
> VERSION=\"1.20\" -DXS_VERSION=\"1.20\" +z
> -I/opt/perl5/lib/5.6.1/PA-RISC1.1/COR
> E
For position, try:
$p=($job{ra}=~/^(.*)\d\d/?length $1:-1);
$p is 0-based index of '\d\d', or -1 if none.
On 10 Sep 2001, Rupert Heesom wrote:
> Date: 10 Sep 2001 12:28:11 -0400
> From: Rupert Heesom <[EMAIL PROTECTED]>
> To: Beginners Perl <[EMAIL PROTECTED]>
> Subject: Problems using REGEXP
I was trying to use the debugger on my windows box and got the following...
Default die handler restored.
Unable to connect to remote host: 127.0.0.1:2000
Compilation failed in require.
BEGIN failed--compilation aborted.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-
ScanMail for Microsoft Exchange has detected virus-infected attachment(s).
Sender = [EMAIL PROTECTED]
Recipient(s) = [EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED]
Subject = Re: Reinstalling Perl on Windows 98
Scanning Time = 09/10/2001 09:49:09
Action on virus found:
The attachment Autoe
}
>
> or if you want to be the quickest in the world, try:
>
> unless ($line =~ /^ (?! [Ldf] )
> (?! LOG_INFO | dhcp | ftpd )
> /x) {
>
># line doesn't start with them
> }
I believe that would also catch lines such as:
don't print this line, it does
Hy people,
I'm searching for a script that makes it possible for a visitor of a webpage to upload
a file from his system (windows i.e.) to the webserver (Apache on Linux maybe).
Any ideas, URL's or sources for me?
Thank you!
Dennis Breithaupt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
Dear List,
Sorry if I have caused a havoc to the mail server for
sending an infected file(I 'm not sure). I need to
scan my machine for this.
I have zipped my files (AUTOEXEC.BAT) for a clearer
picture whether I have done the Perl installation
correctly.The files are as follows:
1. C:\WINDOWS\C
At 05:36 PM 9/10/01 +0100, Sunthari wrote:
>Dear Sir,
>
>Neither could I find/see any significant differences
>in Windows 95. My problem is simple, if perl.exe
>resides in c:\perl\bin (the path in AUTOEXEC.BAT),
>
>1. Why I can't run the scripts from any folder (as the
>book and everyone say)?
>
Dear All,
Kindly take a look at the autoexec files found in my
machine. Maybe that will help u all to see if there's
any mistake or problem with my Perl installation.
Fyi, I have two AUTOEXEC.BAT files from
1. C:\WINDOWS\COMMAND\EBD\AUTOEXEC.BAT
2. C:\AUTOEXEC.BAT (I rename it to autoexec1.
Dear Sir,
Neither could I find/see any significant differences
in Windows 95. My problem is simple, if perl.exe
resides in c:\perl\bin (the path in AUTOEXEC.BAT),
1. Why I can't run the scripts from any folder (as the
book and everyone say)?
for e.g. c:\folder>perl cgi.pl
2.I can only run
- Begin Forwarded Message -
Date: Mon, 10 Sep 2001 18:11:06 +0200 (MEST)
From: Jorge Goncalvez
Subject: Re: Problem with open
To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-MD5: hoCpfVU18Iz7US62lINUDg==
Hi, I made a program which runs good the first time but wrong when
At 02:45 PM 9/10/01 +0100, Sunthari wrote:
>Hi List,
>
>I have posted my problem in running scripts without
>going to the path where perl.exe resides.
>I would really really appreciate in anyone could
>highlight any changes to make while installing Perl on
>Windows 98, esp. those using Perl on thi
On Mon, 10 Sep 2001, Derrick (Thrawn01) wrote:
> Now that I think about it it could be done like this
>
> @tary = unpack "a4a2a2", @data[0]->[17];
> $last_open = "$tary[0]-$tary[1]-$tary[2]";
>
> But wich would be faster ? would unpack be faster than the exp engine?
>
> Anyone's thoughts ?
I bet
> "Derrick" == Derrick <[EMAIL PROTECTED]> writes:
Derrick> Now that I think about it it could be done like this
Derrick> @tary = unpack "a4a2a2", @data[0]->[17];
Can we please stop using the illegal syntax there?
$data[0][17] or $data[0]->[17] or ${$data[0]}[17], but not @data[0]->...
Th
Hello everyone
Im trying to install a module 'Bundle::DBI' and get some funny messages when
i do a make. Im using gnu ANSI-c compiler.
First I issued the command
dycdmp01 # perl Makefile.PL
this produced the following messages
*** Note:
The optional PlRPC-modules (RPC::PlServer etc) are n
Now that I think about it it could be done like this
@tary = unpack "a4a2a2", @data[0]->[17];
$last_open = "$tary[0]-$tary[1]-$tary[2]";
But wich would be faster ? would unpack be faster than the exp engine?
Anyone's thoughts ?
-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PRO
Perl Group,
In Perl, is there any way can I change a password remotely on a unix
machine either by using rlogin or rsh?
Regards,
Rajeev Nalluri
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Either of these will work -- I'll leave it up to the experts to let us know
which one (if any) is faster or more efficient:
$last_open = sprintf '%04d-%02d-%02d', $data[0]->[17] =~
/^(\d{4})(\d{2})(\d{2})$/;
$last_open = sprintf '%04d-%02d-%02d', unpack 'A4A2A2', $data[0]->[17];
Please note tha
Thanks for the help, I think this will work out.
oh. Unusual site you have there.
-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 11:03 AM
To: Derrick (Thrawn01)
Cc: Perl Beginners
Subject: Re: printf to convert 200010809 to 2001-08-09
Derrick schrieb:
>
> @data[0]->[17] contains "20010809"
>
> I've been tring to use printf to convert the 200010809 value out as
> 2001-09-08
>
> $last_open = sprintf "%4d-%2d-%2d",@data[0]->[17];
>
> However this does not work. I get "20010809- 0- 0"
> Any sugesstions on how I should make this
Hello ...
How can i use sysbase with perl ??
Any information, sites, tutorials, etc ... are welcome.
Sorry my bad english.
Gregory
On Mon, 10 Sep 2001, Derrick (Thrawn01) wrote:
> @data[0]->[17] contains "20010809"
>
> I've been tring to use printf to convert the 200010809 value out as
> 2001-09-08
>
> $last_open = sprintf "%4d-%2d-%2d",@data[0]->[17];
>
> However this does not work. I get "20010809- 0- 0"
> Any sugesstions
make your %4d-%2d-%2d look like %4d-%02d-%02dThe zero with the number says
to have zero fill instead of blank fill.
Wags ;)
-Original Message-
From: Derrick (Thrawn01) [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 07:57
To: Perl Beginners
Subject: printf to con
Jorge Goncalvez wrote:
>
> How in Perl you specify a line in a file that don't begin with something for
> exemple I wanted to specify the last line of my file don't begin with
> LOG_INFO,dhcpd or ftpd ?
Use regular expressions with negative lookahead.
E.g, to check a line doesn't start with LOG_
@data[0]->[17] contains "20010809"
I've been tring to use printf to convert the 200010809 value out as
2001-09-08
$last_open = sprintf "%4d-%2d-%2d",@data[0]->[17];
However this does not work. I get "20010809- 0- 0"
Any sugesstions on how I should make this converstion with out adding alot
of o
Jorge Goncalvez wrote:
> Hi, I have this code:
> $PROG2 = "C:\\cygwin\\usr\\X11R6\\bin\\XWin.exe ";
> if (-f $PROG2)
> {
> system($PROG2)
> }
>
>
> but I must take some arguments to this:I must execute with theses arguments:
> -Original Message-
> From: Quang Bui [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 09, 2001 2:10 AM
> To: [EMAIL PROTECTED]
> Subject: perl interact with html?
>
>
> I would appreciate any help with the following. I'm suppose go to
> a URL (http://www.xyz.com/abc.html for examp
Hi List,
I have posted my problem in running scripts without
going to the path where perl.exe resides.
I would really really appreciate in anyone could
highlight any changes to make while installing Perl on
Windows 98, esp. those using Perl on this platform.
BTW, what do they mean by making su
| -Original Message-
| From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
| Sent: Monday, September 10, 2001 3:36 PM
| To: [EMAIL PROTECTED]
| Subject: Re:If always verified
|
|
| Hi, I have this code:
|
| tie *FILE,'File::ReadBackwards', 'c:\\cygwin_syslog.txt'
|
On Sep 10, Jeff 'japhy/Marillion' Pinyan said:
>On Sep 10, Jorge Goncalvez said:
>
>> if(defined $lastline and $lastline =~ /$success/)
>>
>>The if statement is always verified even the last line don't end with success.
>
>You put the '$' in the wrong place.
>
> /succ
On Sep 10, Jorge Goncalvez said:
> if(defined $lastline and $lastline =~ /$success/)
>
>The if statement is always verified even the last line don't end with success.
You put the '$' in the wrong place.
/success$/
--
Jeff "japhy" Pinyan [EMAIL PROTECTED]
Hi, I have this code:
tie *FILE,'File::ReadBackwards', 'c:\\cygwin_syslog.txt'
or die "Can't read logfile.txt: $!";
$lastline = ;
if(defined $lastline and $lastline =~ /$success/)
{
..
> -Original Message-
> From: Paul Jasa [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 08, 2001 7:38 PM
> To: [EMAIL PROTECTED]
> Subject: Q: Can Perl interact (two-way chat) with other scripts
> (processe s)
>
>
> Dear fellow Perl afficionados,
>
> I have run into a bit of a
Hi all,
I am having a strange problem. I used to have few perl scripts working fine
until recently I moved to AIX 4.3.3 from 4.3.1.
With the new version of OS, in all of my perl scripts, if I am running any
shell commands or other perl scripts using backticks are failing in the
following conditi
> -Original Message-
> From: Tjousk [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 07, 2001 10:36 PM
> To: [EMAIL PROTECTED]
> Subject: socket()
>
>
> I have never used perl before today.
> I am trying to run a perl script in windows that works fine
> in linux, but it
> keeps stop
Hey all,
I'm trying to modify an existing script that searches a test file for what
one could qualify as normal phonebook style entries; name, phone #, email
addy, etc. We've got an internal presentation coming up in two weeks, and my
boss would like to WAP-ify this directory for it. That
Hi, I have this code :
tie *FILE,'File::ReadBackwards', 'c:\\cygwin_syslog.txt'
or die "Can't read logfile.txt: $!";
$lastline = ;
if(defined $lastline and $lastline =~ /^LOG_iNFO/)
{
#d
| I've fairly sure that I'm correct on the REGEXP syntax of /[0-90-9]/
| which is looking for 2 consecutive numbers in the string.
No, that's looking for a *single* digit. The brackets [ ] define a
character class. You meant /[0-9][0-9]/, which is easier written /\d\d/.
| What's going wrong in
Hi guys:
I'm a linux enthusiast who is trying to get stuck into Perl.
Currently I'm trying to put together a script which will handle text
files.
I'm having problems with one line which is trying to ascertain the
position of ascii 2-digit numbers in a string.
I've used the following line --
i
Hi,
system will execute the command, and return only the exit status back.
Therefore u cannot trap the output into a variable.
If u want the output of a command into a variable, u can use backticks.
Example :
($output) = `date +%Y%m%d-%H%M%S`;
chomp $output;
This way, the output of the date
I am having a problem creating a freestanding executable using PDK 3.0.
The script runs Ok and when I create an executable which is not
freestanding (i.e. the exe still requires perl to be installed) this exe
also works ok.
When I create the freestanding exe I do not get any errors or warnings
Hi, I wanted to make a test if the first word of the last line of a file begins
by "LOG_INFO".
I wanted to use File::ReadBackwards.A snippet would be great .
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I want to get the output from the following command into an variable:
system("date +%Y%m%d-%H%M%S");
I have tried:
$output = system("date +%Y%m%d-%H%M%S");
But that does not work (only get 0 in that variable).
Please help!
Alexander
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
On Mon, Sep 10, 2001 at 11:27:51AM +0200, Edwin G?nthner wrote:
> The pseudo-hashes have no autovivification - therefore
> $self->{recieve} will result in an error. When using
> hashes, the new hash entry is created without my knowledge.
[snip]
> And as far as I understand there is no way to avoi
Hi, I have this code:
$PROG2 = "C:\\cygwin\\usr\\X11R6\\bin\\XWin.exe ";
if (-f $PROG2)
{
system($PROG2)
}
but I must take some arguments to this:I must execute
Michael Fowler wrote:
> Tearing out the pseudohash code gives an across the board 10-15%
> gain in speed in basic benchmarks. That means if we didn't have
> pseudohashes, normal hashes would be just as fast as fully declared
> pseudohashes!
>
> So don't mourn their passing.
On Mon, Sep 10, 2001 at 10:39:51AM +0200, Edwin G?nthner wrote:
> > They are experimental, and it's not a good idea to rely on them in
> > production code. In fact, pseudo-hashes are on their way out. Typed
>
> Sorry to hear that. I liked the idea to have something more efficient
> than hashes
Hello Michael,
> They are experimental, and it's not a good idea to rely on them in
> production code. In fact, pseudo-hashes are on their way out. Typed
Sorry to hear that. I liked the idea to have something more efficient
than hashes ... on the other hand it is apparent that implementing
ps
On Mon, Sep 10, 2001 at 11:23:28AM +0800, cliff wrote:
> Is there anyone ever calling C subroutine in Perl program ?
There are several ways of calling C code from Perl:
1) Inline::C, available from CPAN, allows you to embed C code directly
in your Perl program;
2) XS (see perldoc
On Mon, Sep 10, 2001 at 10:08:15AM +0200, Edwin G?nthner wrote:
> Are pseudo-hashes and typed lexicals still "experimental"
> or is it save to use them in a project that will might
> be used for 3 to 5 years?
They are experimental, and it's not a good idea to rely on them in
production code. In
Hi there,
I am reading "object oriented perl" from Damian Conway
(execellent book btw.) and he is using pseudo-hashes
and typed lexicals. But he says that these features
are experimental ... on the other hand, his book
is some two years old, so I am wondering:
Are pseudo-hashes and typed lexical
How in Perl you specify a line in a file that don't begin with something for
exemple I wanted to specify the last line of my file don't begin with
LOG_INFO,dhcpd or ftpd ?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
74 matches
Mail list logo