Hi, I'm using XML::Mini to parse and print the contents of an xml file.
The xml file has one root tag "" and identcal children "" which
has 2 attributes "id & name" and 6 children " , , " "
Since their can be any number of "" tags in the xml document at any one
time, however, at all times, the
On Jul 2, 10:04 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> howa wrote:
> > On 7月2日, 下午11時59分, [EMAIL PROTECTED] (John W. Krahn) wrote:
> >> howa wrote:
> >>> Hi,
> >> Hello,
>
> >>> I want to have a max range of rand function, so I use
> >>> my $rnd = rand(4294967295) ;
> >>> However, is it saf
On Jul 4, 4:08 am, [EMAIL PROTECTED] (Jet Speed) wrote:
> Hi All,
>
> I put togather a piece of code with some help, to capture the output as
> below from a file "cxout1" as below. I am sure this can be written in few
> lines or even differnt way of getting the same out put with use of hash etc.
>
+=2) { print "$h2ip[$i]\n"; }
$ ./test.pl
10.203.4.5
10.203.4.7
Or, if you don't mind the longer regex and don't want to have to skip
array indices:
my $string = 'Haresources : 10.203.4.5, Interfaces : 10.203.4.5
10.203.4.7';
my @h2ip = ($string =~ m/(\d{1,3}\.\d{1,
On Nov 17, 12:32 pm, jimsgib...@gmail.com (Jim Gibson) wrote:
> On 11/17/09 Tue Nov 17, 2009 9:24 AM, "Parag Kalra"
> scribbled:
>
> > Hi All,
>
> > I know this may be a very basic question but I don't know how to accomplish
> > it. :(
>
> > I want to know how to redirect a message simultaneousl
On Nov 28, 2:21 pm, paik...@googlemail.com (Dermot) wrote:
> 2009/11/28 raphael() :
>
>
>
> >> 2009/11/28 raphael() :
> >> > Hi,
> >> Hi,
>
> >> > # records.txt
> >> > 25.11.2009 NAME_0
> >> > 15.12.2006 NAME_3
> >> > 20.10.2007 NAME_1
> >> > 01.01.2008 NAME_3 <-- This whole
On Dec 1, 8:58 pm, practicalp...@gmail.com wrote:
> Hello,
>
> Maybe it's not so suitable to ask this here.
> But is there a good way (code sample?) to implement a speed test
> between Perl and C?
> For a project which handles lots of data we want to know how slower
> perl is than C.
>
> Thanks.
T
On Dec 3, 6:56 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> Hi matt!
>
> On Wednesday 02 Dec 2009 18:29:53 matt wrote:
>
>
>
> > On Dec 1, 8:58 pm, practicalp...@gmail.com wrote:
> > > Hello,
>
> > > Maybe it's not so suitable to ask this her
o Perl
http://www.oreillyschool.com/courses/perl1/
Online Course, Pricy but very good.
Tizag Tutorials
http://www.tizag.com/
Free and pretty good.
Matt
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
I am assigning a number of elements to an array like so:
my @new = `find /home/*/new -cmin 1 -type f`;
That works fine. I would also like to append more lines to that array
from here:
find /home/*/filed -cmin 1 -type f
How do I do that without losing whats in the array already?
--
To unsubsc
I have a perl script but I want to exit it if the uptime on the server
is less then say an hour. Any idea how I would get uptime with perl?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
I am looking for a simple way to test if a file does not contain a
string. This is on a linux box.
if myfile does not contain mystring {
#do_something;
}
The file is basically a list of names and I want to test that a
certain name is not in there. Is there an easy way to do that?
--
To un
gger once if its no where in the file.
> The other way would be on shell -
> # Untested
> grep my_string my_file
> if [ $? -eq 1 ]
> then
> echo "Do something"
> fi
> ~Parag
>
>
>
> On Wed, Mar 2, 2011 at 9:55 AM, Matt wrote:
>>
>&g
> The easiest way in my opinion is to use the 'grep' function like this:
>
> my $searchstring="whatever";
> open CFG, '<', $_file || die("could not open file: $_file!");
> my @data=;
> close CFG;
> if ( grep /$searchstring/i, @data ) {
> print "$searchstring found\n";
> }
>
This sorta worked. Ne
I am looking for a perl function or easy way to shorten a long string
if its over X characters.
Say I have:
"Doe, John; 56943 Walnut Drive; SomeCity, NY"
It messes up the display of my html form. So I would like it changed to:
"Doe, John; . meCity, NY"
Keep first 10 and last 10 characters
>> You probably want something like:
>>
>> substr $x, 10, -10, " ... " if length $x> 25;
>
> Very neat Paul. My hat's off to you.
Worked perfectly too. Thanks Paul.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.
Have a date:
2011-05-02-16:40:51
Using this to get it:
$tm = gmtime;
$time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d",
$tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec;
print "$time_stamp\n";
I need to round it to nearest 5 minute point.
2011-05-02-16:40:51
needs
,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
/^DATA.*\.zip\z/s && print("$name\n");
}
Any help would be appreciated.
Matt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
,$gid);
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
/^DATA.*\.zip\z/s && push @files, name;
}
for $element (@files) {
print $element, "\n";
}
What have I done wrong? Although if I put that for loop within the
function it does populate,
Martin Barth wrote:
Hi Matt,
I did that, and then at the bottom of the script I tried looping through
just to verify that @files was populated - no dice.
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
/^DATA.*\.zip\z/s && push @files, nam
Rob Dixon wrote:
Matt wrote:
Thanks Martin,
change following line:
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
/^DATA.*\.zip\z/s && print("$name\n");
to
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &
.
Matt.
On Sun, 13 Aug 2006, hOURS wrote:
Hi all,
I'd be interested in compiling programs I write in PERL. This is possible,
right? I see occasional mention of such here and there but can't seem to find
information on how it might be done. I assume one would need appropriate
softw
And this answers his question exactly how?
Mathew
Arvind Autar <[EMAIL PROTECTED]> wrote: gentoo is a bad distrobution you should
remove it and install a sane
distrobution.
Yours truly
2007/1/9, Jorge Almeida :
>
> I just installed Perl from source. My distribution (gentoo linux)
> supports
king though. If I put the server interfaces down, then
of course it fails with the "Could not create socket: $!\n". However,
if I start the script with the server interface active it starts to
iterate through the loop. But if I then take the server interface down
it still iterates through
Jeff Pang wrote:
} else {
my $whileloop = 99;
}
Hello,
There is a scope mistaken above.You declare $whileloop at the outside of the loop,while here you
re-declare another $whileloop with "my".This $whileloop is different from the former
one.So "my $whileloop = 99" s
voluted solution I'm sure but I can't seem to find anything
else.
Matt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I have a file with lines like so but the number of them is in the
thousands instead of seven lines:
blue
red
red
red
orange
orange
green
I want it to count the occurances of each word it finds in the file.
So output on this small file would be:
blue (1)
red (3)
orange (2)
green (1)
The contents
I believe you can sort an array like so:
sort @my_array;
I need to sort a string though.
I have $a_string that contains:
4565 line1
2345 line2
500 line3
etc.
Obviously \n is at end of every line in the string. I need it sorted.
How would I approach this?
--
To unsubscribe, e-mail: beginner
When I copy a hash like so:
my %hash2 = %hash1;
Modifying hash2 seems to modify hash1. How do I make it so there both
independent after being copied?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Perhaps asking wrong place but I have two directories both full of
hundreds of text files.
dir1/file1
dir1/file2
dir2/file1
dir2/file2
I want to append all files together with same name into a new directory.
dir1/file1 contains:
hi
by
later
dir2/file1 contains:
woops
dropped
new_dir/file1 woul
I have a line like this:
$rststr = get("http://"; . $dst . "/request.htm" );
Problem is that I have had this script hang due to the $dst site being
down. Is there a way to do a time out?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@p
>> I have a line like this:
>>
>> $rststr = get("http://"; . $dst . "/request.htm" );
>>
>> Problem is that I have had this script hang due to the $dst site being
>> down. Is there a way to do a time out?
>
> Consider using the core alarm() function, or using LWP::UserAgent (I'm
> guessing you're
>> Thanks. Yes, using Simple. Looking at this.
>>
>> Can I do something as simple as this?
>>
>> $rststr = "";
>> alarm(60); # set timer for 60 seconds
>> $rststr = get("http://"; . $dst . "/request.htm" ); # try to get my data
>> alarm(0); # turn off timer
>
> More or less, yes--have you tried i
Looking at some old code I wrote.
my @listing;
open(IN, list.txt) or die $!;
while () {
chomp;
next if /^\s*$/;
next if /^#/;
push(@listing, $_);
}
close IN;
I want to trim any new lines off end of data. chomp does that. I
want to skip any lines that begin with # and next if /^#
> Shawn has already provided an answer, but I wanted to point out what
> your regular expression (/^\s*$/) is doing. That expression is
> matching any string that is empty or only contains whitespace.
> HTH, Ken
Thanks. So what happens when you try to 'push' an empty string to an
array? I assume
I have this:
while () {
chomp;
next if /^#/;
# do stuff
}
It skips to the next item in the while loop of the string begins with
# and works fine. I would also like to skip to the next item in the
loop if the string contains anything other then lowercase,
underscores, numbers, da
Having trouble making this work.
my @alarm = ("xyz", "abc");
my $name = "ab";
unless (grep {/$name/} @alarm) { # do this }
Since "ab" is contained in the array I want it to NOT 'do this'. What
have I got wrong?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands,
> Having trouble making this work.
>
> my @alarm = ("xyz", "abc");
> my $name = "ab";
> unless (grep {/$name/} @alarm) { # do this }
>
> Since "ab" is contained in the array I want it to NOT 'do this'. What
> have I got wrong?
If I set 'my $name = "abc";' it seems to match. But I want to match
Looking at ping in perl.
http://perldoc.perl.org/Net/Ping.html
Ii do not see a way to ping with a pattern the way it is allowed under
shell with -p.
http://linux.about.com/od/commands/l/blcmdl8_ping.htm
Is there a way to use pattern without resorting to shell?
I am receiving log entries as a string and then writing them to a file
with the date tacked on beginning. Problem is that sometimes the
string I receive contains \n and it makes parsing the file with grep
more difficult. Looking for a simple way to replace all \n in the
string with text or somet
say that uri_encode is correct.
I don't believe there's a way to get the uri_encode function to do that
for you, but you can translate before or substitute after if you really
need them to match.
--
Matt Howard <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL PROTECTED
I am having troubles matching the Vertical Tab character using regular
expressions.
I have a string, I have looped through every character in the string
and printed out the value returned from ord(), and I get 13 for one of
my chars.
I have searched and apparently that is the vertical tab charact
>ord() returns the _decimal_ number 13 (octal 015, hexadecimal x0D)
which is
>the CR (carriage return) character *NOT* the VT (vertical tab)
character.
Well, that would be my problem. Thank you
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
says "the
beginning of a line, followed by one or more word
charaters, followed by a "_", followed by the end of
the line.
Hope this helps: remember to talk your way through
them step by step...it really helps!
~Matt C.
should be careful, as
you can modify it from the script outside, giving you
weird results.
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
in
your path.
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
throw this in...very
'perlish'.
~Matt
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
h he most likely is...
3) GET LINUX AND DO IT YOURSELF!! You will have a
blast and learn a TON this way. Do yourself a favor
and check this option out. You will be happy you did,
trust me! Then you can get MySQL and really start to
have some fun with your CGIs (but I get ahead of
myself).
ns at work without any problems.
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
about the specifics of
mandrake, but these are two very very common places to
set env. variables. Good luck!
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
cuments and Settings\mcauthor\Desktop>perldoc -f
split
split /PATTERN/,EXPR,LIMIT
split /PATTERN/,EXPR
split /PATTERN/
split Splits a string into a list of strings
...blah blah blah. Very Handy!!
Hope it helps!
~Matt
__
Do You Yahoo!
gives you another
angle of attack.
~Matt
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
it's installed. Hit Ctrl-C to cancel
out. Hope this helps!
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
ktop>perldoc CGI
NAME
CGI - Simple Common Gateway Interface Class
SYNOPSIS
# CGI script that creates a fill-out form
# and echoes back its values.
#-- Etc. Etc.
Here's my other method:
perl -MCGI
...and it just sits there. Your module is inta
e up with the
idea deserves applause.
~Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Matt - This worked for me from my linux box at work,
but not on my home network using win2k...I guess you
just need to hit the right server. BTW, I just yanked
this from the documentation.
#!/usr/bin/perl -w
use Net::DNS;
$name = 'perl.org';
$res = new Net::DNS::Resolver;
@mx = mx($
Sean O'Leary -- Damn that was a good explaination! I
felt like I understood $_ very well before, but I
understand it even better now. A very perlish post
indeed. Larry the linguist would be proud!
Matt
__
Do You Yahoo!?
Yahoo! Auctions - bu
e SSH
functionality).
The crontab is relatively easy to setup and understand
once you get your script written and its permissions
set to execute. Let me know when you get your script
hammered out and we'll get your crontab setup to run
every night at midnig
e Net::Telnet if the need
arises.
~Matt
PS -I read about the use of Net::Telnet with other
protocols from Lincoln Stein's new book "Network
Programming With Perl," which has already paid for
itself two or three times over for me. However, this
time we'll go with the
Perl guru's,
Looking for any examples of using the "stty -echo" command with the the
expect perl module. I'm trying to spawn an ssh session and use an encrypted
password from a flat file. The only problem is hiding the output from the
expect session. Is it possible to make the password hidden
Check out http://www.activestate.com/ for information
on a mod_perl windows environment. Be warned that
Apache is still considered somewhat experimental with
Windows!
~Matt
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great
foreach $rr (@mx){
print "MX: ", $rr->preference, " ",$rr->exchange,
"\n";
}
} else {print "No mx data for $server \n";}
}
If you plan to use mysql, pick up " MySQL " from New
Riders press. Paul DuBois writes a nice tutorial on
the DBI / DBD that will have you doing plenty very
quickly.
Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you wan
particular folder after having
the password emailed to the user...
...which in my opionon is a security risk in itself, but that's the way
clients want it.
For some reason I tend to think VB script might be able to itany
suggestions would be helpful.
Matt
I may be wrong, but it looks like machine 2 doesn't have the Net::FTP module
installed. Try this to see if it is:
perldoc Net::Ftp
If it's installed, you'll see some text pop up straight away. As for machine one,
I'm not too sure. I'm sure someone on the list can help
It's almost certainly (to my mind) your http header. Make sure and use the CGI.pm
module, as it makes this type of thing extremely easy to write.
--- "J. Patrick Lanigan" <[EMAIL PROTECTED]> wrote:
> I am getting an "Internal Server Error" returned to my browser. The error
> log shows the follow
Why isn't the standard tar utility working for you? Try and avoid making things more
complicated than they need to be. Once I spend 45 minutes making a perl script only
to realize that I could get the same results with a one-liner and pipes on the
command line!
~Matt
--- [EMAIL PROT
I'm quickly getting out of my league here, but it sounds like you may want to
consider using SOAP::Lite for a remote call like that. I've never used this module,
but have perused the docs and it looks very very cool and easy to use.
--- Srinivas Samavedam <[EMAIL PROTECTED]> wrote:
> Hi,
>
> M
Not sure if this will help you at this point, but I strongly recommend the
Date::Manip module for anything involving parsing dates. It does everything you can
imagine with dates and more. Tell it to parse your dates, and boom you can print
them however you want, get differences, etc. There are ple
and exiting the script as the same user. This is an interesting one; I'll be
interested to hear any and all feedback.
~Matt C.
--- Paul <[EMAIL PROTECTED]> wrote:
>
> --- Hitesh Ray <[EMAIL PROTECTED]> wrote:
> > I am required to modify an Environment variable from o
Type "which perl" at the command line to see the path to your perl interpreter.
--- "Brett W. McCoy" <[EMAIL PROTECTED]> wrote:
> On Thu, 10 May 2001, lemoninsz wrote:
>
> > hi,i have the same problem,when i do ./emailupload.cgi,error like this:
> > "bash: ./emailupload.cgi: No such file or dir
Chip -- try this in your cgi bin. Type perldoc CGI for more info.
#!/usr/bin/perl -w
use CGI qw/:standard/;
print header,
start_html('hello world'),
h1('hello world'),
end_html;
-- Cgi.pm makes everything easy. In your code below, you fogot to put the first
tag...
---
;);
print "This is the return: $line\n";
Any ideas are appreciated. I need this thing to work, as I'm the one who has to
bounce apache on 15 servers by hand!
Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Oh man I've gotten so used the the || setup I completely forgot about how it treats
the left side as scalar. Changed the script and it worked like a champ. This will
turn out to be a very useful script indeed. THANKS!
~Matt C.
--- Peter Scott <[EMAIL PROTECTED]> wrote:
> At 03
is so rich with utilities I'd be amazed if you don't have it on your box.
If THAT doesn't work, try entering the code by hand. Also consider dumping the
buffer with $|=1; in your scripts.
~Matt C.
--- Chip Wiegand <[EMAIL PROTECTED]> wrote
must be a way to write a
script that will read the long file name and re-name it using VFAT or whatever win
file system type supports long file names. There are simply too many of them to just
rename by hand! Any ideas or modules you can suggest?
Thanks
M
2 | 1 3 1
3 | 3 0 2
Can someone show me a sample of some code? By the way the number of
columns is small and fixed, I can just hard-code that part of the
problem if I can just figure out the reference syntax I should use for
passing the comparator values to the sort functio
You may want to check this out:
http://search.cpan.org/doc/BTROTT/Net-SSH-Perl-1.13/lib/Net/SSH/Perl.pm
I bet this will get you where you want to go.
~Matt C.
--- Ken Hammer <[EMAIL PROTECTED]> wrote:
>
> I need to write a perl script that will gather system information
&
ActivePerl/site/lib/Bundle/LWP.html
~Matt C.
--- kosta gruzdnev <[EMAIL PROTECTED]> wrote:
>
> Thank all the perl gurus answering our naive novices' questions.
>
> ok, now the problem is:
>
> I try to install Net::FTP in WinNT. ppm says there is no such PPD file. T
::Readkey 2.14
Thanks,
Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Please Disregard my earlier post...it's TermReadKey, not Term::Readkey. Oops. Works
as you would expect now. Sorry!
Matt C.
--- Matt Cauthorn <[EMAIL PROTECTED]> wrote:
> This one has me puzzled. I installed Term::Readkey. Totally standard, all tests
> passed. Here's wha
e to you and everyone else out there who has to do mod_perl
installs. Btw, there is an EXCELLENT mod_perl book "Writing Apache Modules in Perl
and C" by Lincoln Stein and Doug MacEachern (the writer of mod_perl). Most of my
notes from the above were taken directly from the book.
~Matt
Check out Linuxnewbie.org. A great site, in a similar vein as Perl Monks. Tons and
tons of help there, and as the name implies it's geared toward promoting Linux and
it's use to neophytes and intermediate folk like myself.
~Matt C.
--- Tony Cook <[EMAIL PROTECTED]> wrote:
;This is scalar context: $scalar
";
# output follows:
This is scalar context: 3
As always, critiques are welcome with any of my posts...
~Matt C.
--- David Gilden <[EMAIL PROTECTED]> wrote:
> Hello,
> Thanks for all the help this list is providing,
>
> Here is today
I was wondering...
if there are any one-page perl-script-templates that're pre-done
that handle typical perl issues, where the header has all the use-strict /
debugging stuff in it... that you can edit and morph into your own scripts.
I had one for bash that was awesome named new_script... it rea
"$ENV{MYVAR}\n"'
testing
Hope this helps!
Regards,
Matt
>
> --- George Petri <[EMAIL PROTECTED]> wrote:
> >
> > Hi all!
> >
> > Firstly, thanks to all those people who helped me with my command line
> > arguments problem.
This works for me...
#!/usr/bin/perl -w
while (<>){
print if $_=~/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/;
}
Regards,
Matt
--- William <[EMAIL PROTECTED]> wrote:
> hi,
>
> i want to be able to read a text file and extract only the valid
> ip addresses. howe
imize it and
try and stay with the curve.
Good luck and have fun!
Matt C.
--- Burt Humburg <[EMAIL PROTECTED]> wrote:
> Just installed Perl on a Linux box yesterday and I'm eager to get started...
>
> Is there a shareware/freeware Perl development environment? (As in comm
I'm trying something like:
for ($i=0; $i<10; $i++){print $i;}
and have the numbers iterate in ONE PLACE at the cursor (i.e. print, then backspace,
print the new number, etc). I'm having problems figuring this out. Any ideas?
Thanks
Matt
Password=>$pass,
Prompt=>'/root\@.*/',
Timeout=>8) || die $s->errmsg, "\n";
@stop=$s->cmd(String=>$stop,Prompt=>'/matt\@.*/') or warn $s->errmsg ,"\n";
print "Stopping $server: @stop\n";
Hope this helps. perldoc -f stat will give you all the nitty gritty on the rest.
Chances are good your script will return much more useful information than you
initially thought!
Matt
--- "PURMONEN, Joni" <[EMAIL PROTECTED]> wrote:
> Hi ya,
>
> I need to check the gro
t empty");
$tunnelok=0;
}
Is this really computationally expensive?
(I already know this makes my code not portable)
Im not calling these very often, is there a better way to do this?
thanks,
Matt
part:
1) Id like to know if theres a better way to do this
2) Is it really horribly expensive to do this with sys calls?
-Original Message-
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 29, 2001 9:52 AM
To: 'Matt Weatherford'; [EMAIL PROTECTED]
Subject:
so how does one redirect both STDERR and STDOUT to $file, do some stuff, and
then get stderr and stdout back and playing nice?
I'm trying:
# if $LogLogfile="YES"
if ( $LogLogfile eq "YES" ) {
print "Logging stuff to log file...\n";
# redirect stderr --> stdout.
here's one for the group... is there a module ala getopt::long that will do
the arg-getting as well as command-line completion with a predefined
list/hash/etc... of keywords?
-mL
-- Life would be so much easier if its source code was well-commented.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
y comments!!
Matt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
from the raw values
supplied by localtime before you do this.
Good luck!
Matt
-Original Message-
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 5:05 PM
To: Beginners (E-mail)
Subject: Explaining myself correctly RE: SORTING BY DATE
List,
Please accept my sic
f thumb - if you can avoid using a system call, do so.
Good Luck!
Matt
-Original Message-
From: Peter Scott [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 5:18 PM
To: Chris Garaffa; [EMAIL PROTECTED]
Subject: Re: Calling UNIX Commands?
At 08:15 PM 8/6/01 -0400, Chris Garaffa
tem command") and die "$!\n"; # AND says "Did I get a
non-zero?"
I prefer the first because it's easier to understand - especially if
somebody else ever has to look at your code.
And I suggest doing it on every system command (verifying the return
value, that is). Bet
success }
Good Luck!
Matt
-Original Message-
From: Qiang Qiang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 10:46 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: To read from a file using RegExp
I have a file as follows:
.SUBCKT JTJTAG Z@@793 Z@@753 Z@@109 Z@@86 Z@@
1 - 100 of 212 matches
Mail list logo