Hi Smiddy,
you wrote:
> This got me wondering. Is the behavior you see caused by limitations
> for $_, or by limitations of the print function? You might try:
> print strlen( $_ ), "\n";
My Perl doesn't know what strlen is. Is it part of a module?
I don't think, it is a limitation of the pr
On Wednesday 13 March 2002 10:30 am, Craig Williams wrote:
> In my first attempt at telneting into sun box from win98, i've been
> receiving the error message : pattern match read eof at scriptName.pl line
> xx-- where xx is the login line. Unable to resolve that error
> through the usua
I suggest: File::Tail if you are wanting to something like tail -f, though.
Works like a champ.
- Jim
At 06:09 03.14.2002 +, Jonathan E. Paton wrote:
> > Is there a perl function equivalent to the *nix command
> > 'tail'?
>
>Here is a basic Perl implementation of tail:
>
>#!/usr/bin/perl
> Is there a perl function equivalent to the *nix command
> 'tail'?
Here is a basic Perl implementation of tail:
#!/usr/bin/perl
@a=<>;print@a[-10,-1];
IIRC there is a shorter way to do it, but that'd
mean going back over the FWP mailing list archives.
> I don't mean like, a workaround throug
If you're having this kind of trouble, chances are you might not be properly
scoping your array. Try declaring the array using my() inside of the scope
you wish to use, for example inside of a loop. Then you won't have to worry
about whether you remembered to undef your array.
-Original M
At 06:38 PM 3/13/02 -0800, Simon K. Chan wrote:
>Hiya All,
>
>I hope you'll forgive this oo perl rookie for asking a routine
>question. I'm not new to perl, but
>the bioperl module I'm working on is giving me a headache! ;-)
>
>
>Let's say I have this:
>
>my @array = qw(12 56 41 23);
>
>my $arra
At 02:19 AM 3/14/02 +0100, Jenda Krynicky wrote:
> > 3) If I bless %self out of the "Tie::Hash" space and into the
> > "APC::Event" space, are the "Tie::Hash" functions going to stop
> > working? (I assume so.)
>
>You can't bless a hash, you can only bless a reference.
>
>What you end up with aft
Hiya All,
I hope you'll forgive this oo perl rookie for asking a routine question. I'm not new
to perl, but
the bioperl module I'm working on is giving me a headache! ;-)
Let's say I have this:
my @array = qw(12 56 41 23);
my $array_ref = \@array;
# where $var1, $var2, and $var3 are other
From: Dave Storrs <[EMAIL PROTECTED]>
> I've got a class called APC::Event. The idea is that when you
> instantiate one of these objects, you are signalling that a particular
> event has happened; ergo, it takes the information you specified,
> deduces a bunch more stuff, and lo
you can always set it to undef also:
@an_array=undef;
---
Luke Davison
[EMAIL PROTECTED]
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 2:59 PM
Subject: Re: Reinitializing an Array
> Barry Kingsbury wrote:
> >
> >
The link is at:
http://www-106.ibm.com/developerworks/linux/library/l-pexcel/
(l not I)
"Tirthankar C. Patnaik" wrote:
>
> An excellent link for the task you have in mind, is:
>
> http://www-106..ibm.com/developerworks/linux/library/I-pexcel/
--
To unsubscribe, e-mail: [EMAIL PROTECTED
I'm trying to install Tk (Tk800.024) but it fails with the text at the end of this
e-mail. I looked and /usr/lib/X11R6 and /usr/lib/X11R6/libX11.2 both exist. So my
question is what am I missing? Or what am I doing wrong?
Thanks,
John T. Shea
jshea@cahp9>perl Makefile.PL
perl is inst
I've got a class called APC::Event. The idea is that when you instantiate
one of these objects, you are signalling that a particular event has
happened; ergo, it takes the information you specified, deduces a bunch
more stuff, and logs all of it to a database. Afterwards it sticks around
and pr
Barry Kingsbury wrote:
>
> I have an array that I wish to reuse. Before I reuse it, I want to clear out all
> elements. Both of the following seem to work:
>
> @an_array = "";
This does not clear out all elements, it assigns one element to
@an_array with the value of "".
> and
>
> $#
Jason Larson wrote:
>
> I'm still new to Perl myself, so I can't tell you exactly what's happening,
> but it looks like $result_value1 is undef when it gets to the if statement.
> I think a better way to accomplish what you're trying to do is simply:
>
> my $result_value1;
> if ($result_valu
Michael D. Risser [[EMAIL PROTECTED]] quoth:
*>I have searched CPAN, but so far no luck. Does anyone know of a module or
*>Perl script that can parse MS Word .doc files?
*>
*>I'm trying to add the ability to display these files in a web browser to a
*>document managment system I found on the web
On Wed, Mar 13, 2002 at 01:27:08PM -0500, Nikola Janceski wrote:
> Here is my question, $follow and $follow_skip I want to be a global variable
> in the scope of the perl script I am running.
> If I put a my in front of the declaration wouldn't it only be in the scope
> of BEGIN or would it be in
grep in perl doesn't work exactly same way as grep in *nix. It functions
differently in perl, and has better uses in perl that the *nix's grep can't
do.
perldoc -f grep
> -Original Message-
> From: James Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 13, 2002 3:06 PM
> To: [EM
From: [EMAIL PROTECTED]
> Where in the Sender.pm file can I find the parameter for
> timeout to the mail server? I need to increase this. I
> keep getting a cannot connect error.
>
> Thanks
>
> Grant
Sorry, there is no such parameter. I'm using plain socket()s with
conn
Where in the Sender.pm file can I find the parameter for
timeout to the mail server? I need to increase this. I
keep getting a cannot connect error.
Thanks
Grant
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
solved my own problem reinstalled the net::telnet module, somebody
screwed with the module code
-Original Message-
From: Craig Williams [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 12:31 PM
To: Beginners@Perl. Org (E-mail)
Subject: net::telnet and read eof error
In m
I have searched CPAN, but so far no luck. Does anyone know of a module or
Perl script that can parse MS Word .doc files?
I'm trying to add the ability to display these files in a web browser to a
document managment system I found on the web.
Thanks in advance
--
To unsubscribe, e-mail: [EMAI
> -Original Message-
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Subject: the scope of BEGIN {}
>
>
> BEGIN {
> if ($^O =~ /^(ms)?(win|dos)(32|nt)?$/i){
> eval q{
> use lib "N:/xxx/perl_lib";
> use Win32::Process;
Could someone help me with PERL522? Thank you in advance.
Is there a certification process for PERL on supported platforms?
We have PERL522 image on all our Clients (NT 4.0 with SP6, more than 8000
clients) and Servers (NT 4.0 with SP6a; HP, AIX). We are wondering if 522
is compatible/or cer
In my first attempt at telneting into sun box from win98, i've been
receiving the error message : pattern match read eof at scriptName.pl line
xx-- where xx is the login line. Unable to resolve that error
through the usual methods I tried executing the rainmaker sample in the
documentati
BEGIN {
if ($^O =~ /^(ms)?(win|dos)(32|nt)?$/i){
eval q{
use lib "N:/xxx/perl_lib";
use Win32::Process;
use Win32::Event 1.00 qw(wait_any);
$follow = 0; # used in find command
I've seen this effect when using data I copied off the internet (using
Explorer) into a text file in a Unix environment. In my case the problem
was definitely a control character within the string causing a line return
without a line feed. It didn't show up when I viewed the file with less or
c
From: [EMAIL PROTECTED]
> I am using Mail::Sender on AIX 4.3.3 and encounter the
> following error when running a script.
>
> Use of uninitialized value
> at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
> line 944, chunk 5.
> Can't use an undefined value as filehandle r
Can anyone help me - I am new to perl (and I love it) and I am trying to
write a script that alows me to upload pictures for the web (.jpg and .gif)
over http.
Any advice would be greatly appreciated
Thanks in advance
Anadi
_
Get y
Hi Nikola/Jason
Thanks for the help.
The variable $result_value1 is declared within the subroutine and is never
used outside the subroutine.
I originally had the following piece of code (which I forgot to show you
guys in the previous email):
$result_value1 = $database1{$input_key1}
But I change
I am using Mail::Sender on AIX 4.3.3 and encounter the
following error when running a script.
Use of uninitialized value
at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
line 944, chunk 5.
Can't use an undefined value as filehandle reference
at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sen
Original Message-
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Subject: RE: "Use of uninitialized value" error message
Hi Nikola/Jason
Thanks for the help.
The variable $result_value1 is declared within the subroutine and is never
used outside the subroutine.
I originally had the follow
One of the primodial reasons for me to chop the file and see it was to see
what it looks like! Since it worked for you for a 1GB sized file, within a
wink of the eye,I am sure that I have strong suspicion in the line length. I
guess, it might be one large 300 MB file with a single line content! Th
try
$ perldoc Getopt
No documentation found for "Getopt".
However, try
perldoc Getopt::Long
perldoc Getopt::Std
perldoc Getopt::Long.html
perldoc Getopt::Std.html
-Original Message-
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2
> -Original Message-
> From: michael [mailto:[EMAIL PROTECTED]]
> Subject: Re: getOpt::long?
> >
> > > I am a true perl newbie.
> >
> > If you continue like this you will stay one.
> >
> :-) Thanks for all the feedback. I had intended to send the
> assignment as an
> attachment and ask ab
Anette Seiler [[EMAIL PROTECTED]] quoth:
*>
*>>From the command line I start the script with "perl script.pl". Now I
*>have to enter some text. I just enter any text, either by typing or by
*>cutting and pasting. I do not enter any strange characters or
*>newlines. I just type in some text. I e
From: "michael" <[EMAIL PROTECTED]>
> :-) Thanks for all the feedback. I had intended to send the assignment as an
> attachment and ask about:
> 1) Configuring my win2k box so that I could use the command line to run a
> perl program without having to type 'perl' before the name
I cut and paste your code. Used a file 1070725103 (~1 Gb) bytes big with
about 100 bytes per line.
and it ran in split second.
Are the lines in your file giant sized (>1Mb/line)?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 11:20 A
Friends,
I need to process 300+ MB text files. I tried to open one such file; read 10
lines (line by line) and output those 10 lines to a new text file. Despite
reading line by line, it was taking a very long time for processing. Is
there anything that I can try to speed it up!!
Here is my pront
that actually won't get rid of the warning. but you are right the
declaration at the top of the script of the varible goes out of scope when
it reaches the if.
you are using -w or
use warnings; in your script that is causing the warning.
perhaps attaching the code would help but we can't tell w
> -Original Message-
> From: Ho, Tony [mailto:[EMAIL PROTECTED]]
> Subject: "Use of uninitialized value" error message
>
> Hi guys
> I was wondering if you could help me with the following problem.
>
> I am getting the following error message:
>
> Use of uninitialized value in string
- Original Message -
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 7:10 AM
Subject: Re: getOpt::long?
> From: Michael <[EMAIL PROTECTED]>
>
> > I am a true perl newbie.
>
> If you continue like this you will stay one.
>
:-)
proper way:
@an_array = ();
or
undef @an_array; # doesn't really free up the memory it used but the array
is uninitialized
-Original Message-
From: Barry Kingsbury [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 10:31 AM
To: [EMAIL PROTECTED]
Subject: Reinitializing an Array
Hi Folks,
This got me wondering. Is the behavior you see caused by limitations for $_, or by
limitations of the print function? You might try:
print strlen( $_ ), "\n";
Thanks,
Smiddy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have an array that I wish to reuse. Before I reuse it, I want to clear out all
elements. Both of the following seem to work:
@an_array = "";
and
$#an_array = -1;
I then go on to do something like:
foreach (@foo_array) {
push (@an_array, $_);
}
Neither seems complete
--aplogies forgot Subject line
Hi guys I am having trouble trying to figure out how to do a match between
two hashes
basically I have the $login and $gid from the passwd file and the $gid and
$gname fields from
the group file. (I got these from getpwent and getgrent)
#!/util/perl5.static -w
#
Hi guys
I was wondering if you could help me with the following problem.
I am getting the following error message:
Use of uninitialized value in string ne at format_imsi_msisdn.pl line 257.
line 257 and beyond consist of the following:
if ($result_value1 ne " ") {
$a= substr($resu
Hi guys I am having trouble trying to figure out how to do a match between
two hashes
basically I have the $login and $gid from the passwd file and the $gid and
$gname fields from
the group file. (I got these from getpwent and getgrent)
#!/util/perl5.static -w
# Build phash
%phash = ();
$gid =
From: Michael <[EMAIL PROTECTED]>
> I am a true perl newbie.
If you continue like this you will stay one.
> I am supposed to:
>
> Write a program that finds lines in an input file and copies them to an
> output file . The program takes the following arguments:
>
>an in
Hi Jorge,
It looks like you want to create a reference data structure to create
your links from.
I would suggest something like:
# filename of link to create on disk
my $path1 = "$RegValue\\InstallOXE.lnk";
# LINK attribute to set => value
my %lnk1 =
( 'Path' => "$CMPath/Active_Perl/Bin/",
'W
If new to unix and you want to find perldoc (or any module),
try this:
find . -name perldoc* -print
That will locate perldoc and show you the path to it.
You could also try:
whence perldoc
That may also work (works for me under ksh)
Hope that helps,
Joe
-Original Message-
From: Tyl
Hi, I have this but it is a bit repeating I wonder how to pass 2 variables and
use only function createScut.My code:
my $path="$RegValue\\InstallOXE.lnk";
&createScut($path);
my $path2="$RegValue\\remove.lnk";
&createScut2($path2);I
Dear All,
the script I'm using is really very simple:
#!/usr/local/bin/perl -w
use strict;
while (<>) {
chomp;
print "\n\n$_\n\n";
}
>From the command line I start the script with "perl script.pl". Now I
have to enter some text. I just enter any text, either by typing or by
cutting an
You probably don't need a perl script for this, there's this command call wget
in linux which you can use to mirror a site, and using the -A option you can
make it download file with specified extention (gif, jpg..etc).
Tor.
Gary Hawkins wrote:
> Would like to save images to disk using their UR
Would like to save images to disk using their URL's. Hoping someone can give
me a jump start on it.
Gary
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi Martin,
>
>
> i have a long text file. in this text file several strings of the form:
> ### filename.jpg ### are embedded.
>
> how should a regex look that takes following:
>
> ### filename.jpg ###
>
> and returns
>
try this.
s/### (\w+\.jpg) ###//;
the filename is in $1
>
>
> and th
Try this regexp.
s/###.*?###//g;
[EMAIL PROTECTED] wrote:
> hi
>
> i have a long text file. in this text file several strings of the form: ###
>filename.jpg ### are embedded.
>
> how should a regex look that takes following:
>
> ### filename.jpg ###
>
> and returns
>
>
>
> and the filen
hi
i have a long text file. in this text file several strings of the form: ###
filename.jpg ### are embedded.
how should a regex look that takes following:
### filename.jpg ###
and returns
and the filename.jpg saved in a $
:o)
martin
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hi, I use Win32::Shortcut with a perl /tk apllication to make a shortcut on the
windows Desktop it works but when I double click my icon my application get a
littele time to come and I wonder it is possible to add a hourglass when i
double click my icon to make waiting the user.
thanks .
--
59 matches
Mail list logo