can try it for free for 14 days and all good perl books are
available in html-format! You can browse through the books there and
buy the ones you are interested in!
Don't forget to check it out!!!
Greetings,
James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
try it for free for 14 days and all good perl books are
available in html-format! You can browse through the books there and
buy the ones you are interested in!
Don't forget to check it out!!!
Greetings,
James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
drieux,
i've been monitoring this list and couldn't help but notice the volume of
your posts. i have to ask: do you ever sleep?
:) james
- Original Message -
From: "drieux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: May 03, 2002 08:45
Subject: Re:
Is there a way of writing a regex to find 1 or more occurances of specific
text string, and replace with a single occurance.
e.g.:
AI01
AI01
AI01
AI01
needs to be replaced with
AI001
thus (m/(AI\d{6}\n)/) will find one occurance and capture as $1 (assuming
delimiter se
Thanks all, I have something working
> $data =~ s/(.*\n)(?=\1)//g;
Can anyone explain the (?=\1) bit? I get the search replace.
J.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I'm writing a sub that take as input, references to a 2d array and a hash-of-
arrays. The 2d array never changes but I operate on and return an updated
hash-of-arrays.
My issue is that I can get the sub working fine, iterating though the 2d array
correctly until I put a return statement in. O
I have some code which creates a hash of arrays (HoA) then runs a 'while'
loop, growing the HoA until x. So far the code works great but I have a data
set I know will create a huge HoA and maybe eat up the memory. It's 'skinny'
data in terms of lots of 'keys' => a few array values each. I'm h
Net::DNS::Packet->new(\$data_obj);
$dns_hdr = $dns_obj->header;
@dns_qs = $dns_obj->question;
if ($dns_hdr->rd) {
$drop = "yes";
}
if ($dns_hdr->qdcount == 1) {
if ($dns_qs[0]->qname !~ /(firstdomain|seconddomain)\.com)$/i) {
$drop = "yes";
}
Net::DNS::Packet->new(\$data_obj);
$dns_hdr = $dns_obj->header;
@dns_qs = $dns_obj->question;
if ($dns_hdr->rd) {
$drop = "yes";
}
if ($dns_hdr->qdcount == 1) {
if ($dns_qs[0]->qname !~ /(firstdomain|seconddomain)\.com)$/i) {
$drop = "yes";
}
manually, but i couldn't seem to put them
together in a script that would do what i needed.
does anybody know how to do this?
(i'm asking out of laziness so i'm hoping the person who answers this doesn't have to
put much, if any, effort into doing so :))
thanks,
james
I am looking for someone to write a datebase that will edit text files and
read text files on the fly and return the results of the text file into a
easy to read table. I will be used to keep track of payments and customer
information for a non-profit company, if anyone can help me, it would be
mu
http://www.utexas.edu*
(replace 'http://www.utexas.edu' with whatever it is i'm trying to
redirect to)
does anyone know why this is happening and how i can fix it?
thanks,
james
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
newFileName
'WScript.Echo newFileName
Next
MsgBox "Finished!"
i'm supposing the problem lies with my not getting the typography or syntax right for
filenames that can have all kinds of typography in them. could somebody kindly set me
straight on what would have made my perl script run so that i wouldn't have had to
have done a vbscript?
thanks,
james
hi, group,
just asking if anyone knows of plans to port perl to the palm platform.
thanks,
james
rate
# the xml string. Any suggestions?!
}
}
JF
=
Regards,
James Fisher
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
> @array2 = { bah, @array1, blah, blah }
unless you make an reference to the array like John said, the @array1 will
be "flattened"
so to keep the array do this:
$ref_array = \@array1;
@array2 = { bah, $ref_array, blah, blah };
then to use it you need to dereference it.
> -Original Message
woops
use parens not braces:
@array2 = ( bah, $ref_array, blah, blah );
> -Original Message-
> From: Kipp, James [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 9:58 AM
> To: Beginners (E-mail)
> Subject: RE: arrays
>
>
> > @array2 = { bah, @array1
This code is a mess, your better off rewriting it.
>
> open iscd,"<$ARGV[0]" or die "Cannot open $ARGV[0]",$!;
> open sortcode,">$ARGV[1]";
> while($line=){
> chomp $line;
> @fields=split "\t",$line;
> printf sortcode
> "\n%6.6s%8.8s%3.3s%27.27s%20.20s%35.35s%35.35s%10.10
I have a perl script which generates many compilation errors which
scroll off the DOS window perl is running in. How do I capture (or
recover) the lines that have scrolled away?
--
james crease
hould be in the outputfile.txt then
>
>regards,
>
>Jos Boumans
>
>- Original Message -
>From: "james crease" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, June 20, 2001 10:49 PM
>Subject: compilation errors in win98
>
>
likely to help as most of the errors are
consequential on the original "real " error, but thanks for the thought.
>
>
>-Original Message-
>From: james crease [mailto:[EMAIL PROTECTED]]
>Sent: 21 June 2001 09:26
>To: [EMAIL PROTECTED]
>Subject: Re: compilati
allow for a scroll bar as
suggested by one comment nor does it have a layout tab to set the size
of the window although it does allow a set to a maximum of 50 lines.
If there are any other thoughts on stderr capture I'd be pleased to hear
them :-(
>
>On 21 Jun 2001 09:26:28 +0
In message <[EMAIL PROTECTED]>, Tim Musson
<[EMAIL PROTECTED]> writes
>Hey james,
>
>Thursday, June 21, 2001, 9:26:34 AM, you wrote:
>
>jc> The version of DOS I have on win98SE doesn't allow for a scroll
>jc> bar as suggested by one comment nor does it h
Hi Guys
I know this looks like a cgi problem but I believe it is more of a varable
scoping problem I just happen to be having with the CGI module. While I am
waiting for answers to this I am off to buy the most reccomended ""Learning
Perl" book. Thanks for any help
I have this code.
require
In message <[EMAIL PROTECTED]>,
Aaron Craig <[EMAIL PROTECTED]> writes
>At 21:49 20.06.2001 +0100, james crease wrote:
>>I have a perl script which generates many compilation errors which
>>scroll off the DOS window perl is running in. How do I capture (or
>
Hello
Anyone have any good routines they use to mimic the head and tail the UNIX
head and tail utils ? I am writing a script for Win32 that I need to head
and tail a large data text file. Any help is appreciated.
Thanks.
Jim
>>
> MBNA, eh? (japhy checks the credit card bills he
> receives...) ;) I guess
> it'd be in my best interest (no pun intended) to help you, then.
LOL !!! Actually I am a independent contractor, so I don't really work here
:-)
>
> Uri Guttman wrote File::ReadBackwards, available on CPAN,
>
I think :
"a" cmp "b" ; # -1 ab
> -Original Message-
> From: Nick Transier [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 3:31 PM
> To: [EMAIL PROTECTED]
> Subject: comparing strings
>
>
> Does anyone know a way to make boolean comparisons between strings?
> For example, I wan
Japhy
Thanks again. This worked fine and was a singnigicant performance increase
from slurping the whole file into the array.
One information question I have for you.
Why 'scalar ' ??
It worked real well, I just want to know why ??
Thanks
JIm
> open HEAD, "< $file" or die "can't read $file: $!"
> --- "Kipp, James" <[EMAIL PROTECTED]> wrote:
> > Why 'scalar ' ??
>
> If I may? =o)
of couse :-)
>
>push @head, ;
>
> would put the filehandle access into a list context, and would try to
> append the entire file to @head.
ah
in UNIX there functions that read thru the /etc/passwd, here are a few
examples:
$user = getpwuid($<); #gets username
if you want the full name you can do something like:
($username = (getpwnam($user))[6]) =~ s/,,,//;#gcos field , strips out the
crud too
in windows I use the posix module:
use PO
There is a script at the Roth site (same place U get Win32::AdminMisc)
called diskpig.pl that I think is exactly what U are looking for. If U are
going to be doing alot of Win32 Admin stuff, it would be to your advantage
to learn Win32::AdminMisc. It can do so many things and the interface is
pre
Hi Matt
Can you describe a little bit what U are trying to do or include more of
the code. Depending on what U are trying to do, there may be less expensive
alternatives
Thanks
Jim
>
>
>
>
> From PERL, I have been doing some system calls like this:
> (see * lines)
>
>
> * my $procentry=`
>
> sorry about the terse code snippet
no problem, it is good code :-)
>
> Basically, I have an SSH tunnel that is controlled by another
> process and I want to tell when that ssh tunnel is closed.
Have you or R U looking into or using IO::Socket::SSL ??
There might be a method in there
if your looping thru the elements of an array you can always just grab the #
of elements:
$elem = scalar(@array);
> > Is there a perl variable that automatically counts loop
> iterations. Such that I
> > don't have to use '$count':
> >
> > foreach (@array){
> > $count++;
> > ..whatever..
Hi
I am sure this is not supposed to be so hard but I still cannot get the hang
of passing these objects around.
What I am trying to do is work with CGI.pm
I have a cgi object and I also want to break my program up into subs to keep
it clean and easy to code.
So I create a CGI object. It's gre
well you you could wind the dirs into an array and leave out the . and ..
my @dirs = grep (!/^\.\.?$/) readdir(DIR);
or you can just skip over as you go:
while ($file= readdir WDIR) {
next if $file =~ /^\.\.?$/;
> -Original Message-
> From: Maxim Berlin [mailto:[EMAIL PROTEC
Well there is ASP and PHP and cold fusion.
PHP is becoming quite popular
you might want to check into fastCGI, check the apache web site for that
> -Original Message-
> From: George S Pereira [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 6:15 AM
> To: Michael Fowler
> Cc: [
OK, You win !! :-)
> -Original Message-
> From: Pierre Smolarek [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 9:22 AM
> To: Kipp, James
> Cc: [EMAIL PROTECTED]
> Subject: Re: Is there an alternative to CGI ???
>
>
> ASP is a structure, not to
here is a routine that I wrote that I use in many scripts as a quick line
count:
sub wc
{
my $file = shift;
my $numlines;
open(FILE,"$file") or die "$file :$!";
$numlines += tr/\n/\n/ while sysread(FILE, $_, 2 ** 16);
return($numlines);
}
> -Original Me
Just wondering what the policy on sending file attachments to the list !
I have a script I am trying to debug but it pretty long, and I was wondering
if I could send as an attachment, or should I just include in the email ?
Thanks
Jim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
Thanks
I think I will just include in the email text as a long snip
> -Original Message-
> From: Pierre Smolarek [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 10:47 AM
> To: Kipp, James; [EMAIL PROTECTED]
> Subject: Re: Policy on file attachments
>
>
&
>
> $PI = \3.1415926535;
> print "(1) $PI\n";
> # prints SCALAR(0x8101f64)
because it is not dereferenced so the value is the memory location.
>
> $PI = 7;
> print "(2) $PI\n";
> # prints 7
like it should
>
> *PI = \4.31415926;
> print "(3) $PI\n";
> # prints 4.31415926\
the typeglob provi
Does anyone know where to find good information on the expect module?
the camel book did not say much about it.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
yes and yes :-)
Thanks
> -Original Message-
> From: Rachel Coleman [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 29, 2001 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Expect
>
>
> > Does anyone know where to find good information on the
> expect module?
> > the camel book did not s
Hi,
I am looking for a way to load a file containing the
following example data into a hash
#From TO
Jim James
Art Arthur
JohnArthur
Then when $a=Jim I would like to convert it to
$a=James.
Can this be done?
Jim
__
Do You Yahoo
--- James Ferree <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for a way to load a file containing the
> following example data into a hash
>
> #From TO
> Jim James
> Art Arthur
> JohnArthur
>
> Then when $a=Jim I would like to convert
Hi,
I have some value I want to remap stored in a tab
seperated file
For example
#FROMTO
Jim James
Bob Robert
I would like to load the file into a hash and then
everytime I see $a=Jim I would like to set $a=James.
Can I do this with a hash? It think it would be a lot
faster than
ot;") || ($ii_phase eq " "))
{
$ii_phase = "NOT MAPPED";
}
else
{
print "II Phase not found in keys file:
$ii_phase\n";
}
}
--- Bob Showalter <[EMAIL PROTECTED]>
wrote:
> > -Original Mes
No, this is not a stupid question. Just a couple of months ago I was asking
the same question, but now I use eval quite a bit. Once you use it a few
times you will understand it. Here is a case where I used it recently, I
hope this example will clear it up for you a bit.
--
eval {
my $net
I have this script that recursed through a directory on a network drive and
it's subdirs flagging files based on a couple of params.
Firstly, I know this will be resource intensive. Is there a better way to do
this that is maybe not even a Perl solution?
Secondly, the script is failing to recurs
Have you configured a cgi-bin directory in IIS to recognize scripts with a
.pl or .cgi extension ?
> -Original Message-
> From: Ackim Chisha [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 12:48 PM
> To: [EMAIL PROTECTED]
> Subject: System Command to call an external command.
Yes, I know and it works fine with that. I was hoping to understand why the
recursion did not work as it is supposed to. Any IDeas?
> -Original Message-
> From: Jeff 'japhy/Marillion' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 12:56 PM
>
Hi Maxim
Thanks so much for your help. Is this how the code should be before I test
it again.
---
use Cwd;
$log = 'c:\\temp\\chk_space.txt';
$path = 'dbm\\marketing_database_II';
open(LOG, ">>$log") or die "Can't open $log: $!";
print LOG "These files are over 60 days old and over 50MB\
e[2]: Help with Recursive script on Large Directory
>
>
> Hello James,
>
> Tuesday, August 28, 2001, Kipp, James <[EMAIL PROTECTED]> wrote:
> KJ> Thanks so much for your help. Is this how the code should
> be before I test
> KJ> it again.
>
> It depends o
Did you install the DBI package manually? or did you use CPAN ?
If possible use CPAN to install it:
perl -MCPAN -e "install 'module_name'"
> -Original Message-
> From: Imtiaz ahmad [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 4:46 PM
> To: Perl_beginner (E-mail)
> Sub
try using the glob() function..
it does this nicely
> -Original Message-
> From: Ken Hammer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: Passing Wild Cards to System Commands
>
>
> Hi All,
>
> I'm trying to pass wildcards
05, 2001 5:01 PM
> To: 'Kipp, James'; Perl_beginner (E-mail)
> Subject: RE: "connect" method
>
>
> I just copied over the file from different machine with same
> version of Perl
> to all the directories it searched for the package.
> I'll do as you
Glad it helped
> -Original Message-
> From: Ken Hammer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 5:26 PM
> To: Kipp, James; [EMAIL PROTECTED]
> Subject: Re: Passing Wild Cards to System Commands
>
>
> Thank you James, that did the tri
@array = ;
> -Original Message-
> From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 13, 2001 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: Re:File & Array
>
>
> Hi, How in Perl you can store each line of a file in an array?
>
> Thanks
>
>
> --
> To unsubscri
Reg
I have the same FW problem and here is how i install the modules:
1. make sure you get the mods from:
http://www.activestate.com/PPMPackages/zips/6xx-builds-only/
2. Download the zip file and unpack it into a temp dir, say c:\temp
3. At the cmd prompt Cd to the temp dir where the files are (C
>
>>
> When you do:
>
> open my($foo), $path;
>
> Perl is expecting a typeglob. If you give it an undefined value, it
> autovivifies the typeglob reference, so *$foo is the
> filehandle. However,
> references to filehandles are accepted wherever a filehandle
> is, so you
> can just use $f
You need to use the -l parameter to specify the login name
ssh 192.168.2.21 -l arfan
you can type ssh --help to get a list of params
Nyx
arfan wrote:
> dear all
> i have created a username on debian machine .now i want ssh to that
> machine so there comes always root passwd
>
> ssh 192.168.2
the array starts at 0 not 1
you should realy look at foreach instead
Pacifico wrote:
> i have this program:
>
> $sup1='a';
> $sup2='b';
> $sup3='c';
>
> for ($i=1 ; $i<4 ;$i++){
> print $sup($i);
> }
>
> but give error, why???
Good point ... note to self ... don't try and help people while to busy
to really focus on problem.
I jumped down to the loop without looking at the code
Tad McClellan wrote:
> On Tue, Apr 17, 2001 at 02:01:14PM -0700, James Fisher wrote:
>
> > the array
d the extension. the rest of the
filename is a sequence number which changes everytime it creates a new file.
James D. France
UPMC Health System
Information Systems Division
Email: [EMAIL PROTECTED]
Phone: 412-647-0790
Fax: 412-647-5961
James D. France
UPMC Health System
Information Systems Division
Email: [EMAIL PROTECTED]
Phone: 412-647-0790
Fax: 412-647-5961
Here is one way:
(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/g)
-Original Message-
From: walter valenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: reg expr
How i can write a reg. expr for find the IP address in log file like:
15:46:25
Hi
I am the processing of writing a simple module and my brain just froze.
I am trying to valide data that is being passed to the object constructor
to make sure the arguments are acceptible. The args are being passed as
named arguments.
--
# hash of default or allowed data,
my %_default = (
If it works, why change it?
But if you want you can do something like
$outfile = `ufsdump 0uf /dev/rmt/0n /dev/rdsk/c0t0d0s0`
which should capture the output into a scalar string and you can just print
or capture the output in a list context
@outfile = `ufsdump 0uf /dev/rmt/0n /dev/rdsk/c0t
>
> >
> >foreach my $attr ( keys %_default ) {
> > my ($argname) = ($attr =~ tr/a-z/A-Z/); # make sure key is
> >uppercase(like FILE)
>
> But you get to populate %_default, right? So you can make
> sure that the
> keys are uppercase. I don't understand why you do this tr.
The user
> > >
> > > But you get to populate %_default, right? So you can make
> > > sure that the
> > > keys are uppercase. I don't understand why you do this tr.
> >> >The user will not populate the %_default.
>
> Right, that's what I meant, you're populating it. So I don't
> see that you
> need t
Hi
When I bring win32 files over to Unix I use 'tr/\015//' on the file to get
rid of the hard return (^M). anyone know how to convert it back the other
way?
I tried some sed commands but none seems to work.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
ED]]
> Sent: Wednesday, September 26, 2001 4:03 PM
> To: 'Kipp, James '; '[EMAIL PROTECTED] '
> Subject: RE: Converting *nix file to dos
>
>
> Many unix systems have both a dos2unix and unix2dos
> command...you might try
> that.
>
> -Original Me
SOrry
I should have stated I was looking for a perl way, not involving calling
external commands.
Thanks
> -Original Message-
> From: Bill Jones [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 4:10 PM
> To: Gibbs Tanton - tgibbs; 'Kipp, James
Thanks Robert
I will give that a shot
> -Original Message-
> From: Robert Citek [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 4:13 PM
> To: 'Kipp, James '
> Cc: '[EMAIL PROTECTED] '
> Subject: RE: Converting *nix file to dos
>
n't
> edit it with a Word-Processor...
>
> :)
> -Sx-
>
>
> On 9/26/01 4:11 PM, "Kipp, James" <[EMAIL PROTECTED]> wrote:
>
> > SOrry
> > I should have stated I was looking for a perl way, not
> involving calling
> > external
Thanks
If anyone is interested, Robert's suggestion worked:
$line =~ 's#\012#\015\012#g;
Thanks so much Robert !!!
>
> one way (non perl) would be to get hd2u-0.7.1 from www.freshmeat.net
> I am sure there is a perl way...
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
>
>
> I need to write a script on both NT and UNIX to monitor a process and
> restart if it fails. I know how to do it in UNIX, but am
> wondering if there
> are any PERL functions that would work across platforms so I
> won't have to
> recreate the entire script for the NT box. I have avai
Hi,
Any good books on how to create graphs using Perl?
Which perl modules should I consider for this?
TIA,
Jim
__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
> #Please note that I am trying to access a new non-existing
Autovivication does not happen when you are trying to access the non
existing key, it happens when you are trying to assing it. So if you have:
$href->{foo}
and you do something like
print $href->{fou}
it will then create this ent
any reason why you are sending emails to the list in html ??
-Original Message-
From: nafiseh saberi [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 9:03 AM
To: perl
Subject: FORK
hi all...
do you know about fork function in perl?
and do it have any relation with operating
s
actually this way will catch the : in front of 1 and avoid starting at 0:
@list = split (/:/ ,$line);
for (0..(@list-1)) { @list[$_] = sprintf(":%d",@list[$_]); }
> -Original Message-
> From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 22, 2001 12:47 PM
> To: [EMAI
>
> use strict;
>
> $line = "1:2:3:4:5";
> @list = split (/:/ ,$line);
>
> for (1..@list) { @list[$_] = sprintf(":%d",@list[$_]; }
good call, but you will need to do :
(1..(@list-1)
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Sorry. me again.
one more time..this will include the "" around each item, exactly what you
needed:
@list = split (/:/ ,$line);
for (0..(@list-1)) { @list[$_] = sprintf("\":%d\"",@list[$_]); }
> -Original Message-
> From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October
yes, I caught that a bit after I sent it off !
Thanks.
> -Original Message-
> From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 22, 2001 1:21 PM
> To: Kipp, James
> Cc: [EMAIL PROTECTED]
> Subject: Re: How to split it?
>
>
> In
; (":1",":2",":3",":4",":5"); and since it's not qw() the ""
> are to quote each
> item
I agree...but just in case :-)
Good thread, I learne a thing or 2 myself
>
> Etienne
>
> "Kipp, James" wro
If your working in vi , you could do:
:1,10s/./# &/
which will comment lines 1 to 10
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here Here !!
> -Original Message-
> From: Gary Hawkins [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 30, 2001 1:43 AM
> To: [EMAIL PROTECTED]
> Subject: RE: off topic - javascript question
>
>
> When we're done with the terrorists I suggest we go after
> these people cheating
> t
statment. I am really trying
to do this all in perl instead of mixing it with awk.
Any ideas?
-James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thank you to all who replied to my mail. I basically went out, and grabbed
the Filesys::DiskFree module, and incorporated it into a daemon script.
Thanks so much...
-James
P.S. Incase anyone wants to see the finished product, take a look below.
Thanks!
#!/usr/bin/perl -w
# Local to main
>
> $percent = `df -k | awk '{print $5}'`;
> if($percent > "90") {
>
> do something
> }
>
> I though that this would work, but I didn't get just the %
> column from the
> awk statment. I am really trying
> to do this all in perl instead of mixing it with awk.
in that case all
> You can try the following
>
> ($percent) = `df -k` =~ /(\d+)%/;
>
> Regards
> Robert Graham
There you go James !!
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
there is a special var $. that hold the current record number
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 11, 2001 9:30 AM
> To: [EMAIL PROTECTED]
> Subject: Line in file
>
>
> Hi,
> I there a way to tell the number of the line in
Hi,
I am using Perl win32 and when I read in a long string
with multiple lines, my computer gets hung up when I
try to print the string, it get part way through the
string and hangs in the middle of the line.
Has anyone seen this?
Thanks,
Jim
__
Hi,
I am having a problem where windows gets stuck if when I try to handle a long string
containing multiple lines of text.
When I try to process just that data set by itself, I do not have any problems. Could
I be running into memory problems?
How would I know if I was running out of memory?
lose(FILE);
What I want to do is read just the last line. Might help in the case of a
password file or something like that.
Thanks!
-James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Well, I thought of that earlier, but I also thought that I was not
guaranteed that the order of an array was unreliable, so I may not actually
be getting the 'last' of the file. True or untrue ?
-James
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sen
Ok, thanks!
-James
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 10:49 AM
To: James Kelty; [EMAIL PROTECTED]
Subject: Re: Last line of file...
I've never had an instance where that didn't work. I use for $a(0..$#array
hi,
how do i reset a foreach loop so that it starts at the top each time?
a sample of my code looks like:
foreach $zrec (@file) # file with agent and city
{ chomp($zrec);
foreach $zkey (@template) # put agent city data into hash
{ $hash{$zkey},$zrec)=split(/\//,$zrec,2);
1 - 100 of 1378 matches
Mail list logo