I appreciate the suggestions from Mike, Michael and John around my log
parsing questions.
When attempting to match 'or' conditions using the the m!! and x pattern
match operators, would this construct be correct?
In other words, does this m// attempt :
# match lines begining with #, or lines th
Also, try: perldoc perlretut
http://www.perldoc.com/perl5.6.1/pod/perlretut.html
spoken by one who has miles to go w/regex
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
John, thanks for the succinct suggestion on the set in place edit
extension.I'll humbly accept additional "yo here's how to simplify this
deal" examples. ;^)
I could still be doing a number of things wrong, I can launch the script ,
but it 'hangs', & my prompt doesn't return. I'm not getting
John, ...
Thanks for your suggestionsI would like to take each old filename
('ex020525.log' or exyymmdd.log...) and output
'exyymmdd.new' or even 'exyymmdd.log.new'
> How are the new file names defined? Are they based on the old file
> names or something else?
>
> open IN, $old_filename
All,
I'm scratching my head trying to determine whether perldoc isn't working
correctly or if Net::FTP just isn't present?
If I need to obtain Net::FTP from CPAN , how would I install as not
and use it? I wouldn't simply be able to:
use Net::FTP; # would I?
Tried: /bin> perldoc -m Net::FTP
I read (ok, skimmed...) the results from perldoc -m cwd. I don't
understand cwd (current working directory). My questions apply to this
general scenario:
In practice, I'd like to work with my .pl or .plx files in say, /myhome/bin/
Suppose I want to do some looping on some files in /data/path
I wanted to download a couple of roth.net modules. Unable to reach
www.roth.net since 3 July.
Are others able to access it OK?
Rob
--
Rob McCormick
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
gang,
Tried using ppm:
# PPM> install --location=http://www.roth.net/perl/packages Win32-AdminMisc
Install package 'Win32-AdminMisc?' (y/N): y
Installing package 'Win32-AdminMisc'...
Error installing package 'Win32-AdminMisc': Could not locate a PPD file for
package Win32-AdminMisc
OK, checked
Thanks for the prompt repliesmy apologies, but I'm not grasping the
quoting problem(s) or another problem.?
I revised the code to use an @array v. $scalar. I also noticed I left out
the -odq option in the perldoc example, so inserted it (as docs indicate,
controls queuing/delay )
Update
Gang,
Using 'df -k' in bash, I can get this to work acceptably:
# mail the disk usage for a file system to a recipient 'uid'
df -k /data/wrc |mailx -s 'host disk usage' [EMAIL PROTECTED]
I'd like to use perl to surround the output of df -k with a simple text
message. I used perldoc -q mail to
I'm on Solaris that has Perl installed but I'm unable to use 'perldoc'
:~> perldoc perl
bash: perldoc: command not found
~> perl -v
This is perl, version 5.005_03 built for sun4-solaris
~> perl -V
Characteristics of this binary (from libperl):
Built under solaris
Compiled at Dec 22 1999
within most Solaris shells, no need for Perl, try
/usr/bin/dmesg | more
I guess you'd do system '/usr/bin/dmesg' and grep out the lines you need...
hth,
Rob
--
> I am looking for a way for Perl to determine how many processors are
> on a
> system. I know in Windows, I can use th
Tried perldoc LWP::Simple
noted the example:
perl -MLWP::Simple -e 'getprint "http://www.sn.no";'
so I tried:
/usr/central/bin/perl -MLWP::Simple -e 'getprint "http://foo.acme.com/";'
# perl is in /usr/central/bin
on Unix the error is:
501 Protocol scheme 'hostfirewall.acme.com' is not suppor
print RESULT grep { ! /_vti_cnf/ } ;
# so that could be read as print to the output filehandle the result of the
input file handle filtered by grep.
wow - pretty concise line thereworks well.
I'll need to look up $0 (perldoc perlvar: Contains the name of the file
containing the Perl
ile") or die "$!"; # runs, but nothing written to file?
My $outfile time stamp is changing, but I don't think data is making it to
the $outfile.
Rob
--
> -Original Message-
> From: Dan Brown [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 5:45 PM
&g
gang,
# problem: open a file
# find lines that meet a condition, put them in an output file
Could you share some patterns/sample code that you use to accomplish this
task? What pattern do you use when the output file doesn't exist when the
script begins?
The code below errors with:
C:\WINNT\P
gang,
If I'm tackling too much for a beginner, I realize you're not in the
business of doing someone else's work. Here goes: I'm attempting to use
find2perl using Binary build 522 provided by ActiveState Tool Corp.
http://www.ActiveState.com Built 09:52:28 Nov 2 1999
problem/task:
# print th
I'm trying to understand an example from the Waite Press book (Perl 5
Interactive Course, a bit dated, '97, Orwant) The example doesn't have -w
or strict; enabled. I ran it with them and the error follows:
#!c:/perl/bin/perl -w
use strict;
print "Please type an integer: ";
chomp ( my $num = )
Gang,
I'd like to rename the existing files in a directory to "filename.txt" The
files have no extensions, and have names like:
B0724 B0834 B1236 B1356 B1370
A0012 A0036 A0050 A0120 A0302 A0310 rename1.pl
Y
Z
I pulled a sample of files over to a test directory on my desktop and I'
Excellent Brian, thanks...
Question, re: the [EMAIL PROTECTED] address
Is there a way (or command) to force the digest to arrive as one message
(with all messages appended within one) as opposed to a message with
embedded objects(messages).
Is it a mime-type setting?
Outlook 98 is my mail clie
20 matches
Mail list logo