Hello,
Using BerkeleyDB in Perl 5.8.8 on a FreeBSD system, I am applying its tied
hashes inside forked children of a daemon, as a means of IPC. This works
great, except that for every child, when it forks, I currently set the
environment and initialize the databases, like:
if (not eval {
Anybody out there using MQSeries and Perl?
I can connect to the local Queue Manager and do fun things like:
List Queue
Stop and start Channels
But now my client would like the scripts to connect to other queue managers on
other servers.
I can't seem to get any to connect.
Does anyone have som
it any other way.
- Mark.
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
s in the BLS:: namespace to the local mirror, without
having to upload them to CPAN. Yet they are installable just like CPAN
modules anywhere in the organization. This is really neat.
- Mark.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Techn
> Is it my imagination, or are there more autorespond messages ("I'm not
> here...") on this list than is usual?
>
> -Tom
>
> --
> Tom Browder
> Niceville, Florida
> USA
People are out of the office at the end of summer near Labor Day? Who
woulda thunk? :-) Perhaps the whole "vacation" thing is
I have a list of IP addresses that I am getting status for.
Where possible I will use a socket connection.
However, some of the IP addresses I need to ping.
I have a list that I need to parse through and perform a
ping against.
The list can look like this:
@PINGONLY =
172.
Folks,
I am forced to use perl v4 and am wondering what is the
quickest/easiest way to obtain the drive size on windows os
Thanks,
David M. Funk
President/CEO
Tivoli Certified Enterprise Consultant
Specializing in Network and Systems
Management Solutions
Trinity
Soluti
r you: http://www.shelldorado.com/scripts/cmds/timeout.txt
- Mark.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Arijit DasSent: Monday, March 13, 2006 8:30 AMTo:
perl-unix-users@listserv.activestate.com;
activeperl@listserv.activestate.comSubject: [Perl
ools->table_value(...);
- Mark.
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Dumper, supports anything you can put in a data structure, and
for simple things like a hash, it will create a file that's easy to
parse, import into Excel, etc.
- Mark.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
252
Just a guess, but... lines in unix text files must all end in a newline.
If you edited the crontab in Windows, it may have left off the final newline
unless you specifically hit Enter at the end of the last line.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
sub { extract_bracketed($_[0],'{}') },
],
undef, # no maximum
1, # skip separator commas
);
print join "\n", @pairs;
#---
- Mark.
>
I recompile perl on Solaris machines all the time, with no problems.
What do you mean by the programs "don't start"? What's the output of perl
-V? Can you execute your old programs by typing "perl progname"?
- Mark.
> -Original Message-
> From:
Arijit Das wrote:
> Is there anything like set -x in Boure Sheel scripts
> in Perl which can print all the statements as they are
> executed?
I would recommend using the debugger. It's a better solution anyway.
--
Mark Thomas
Internet Sys
can export files from OpenOffice in
.doc format. Perhaps this will accomplish what you want in a roundabout way.
- Mark.
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Just a hunch... Try removing the space before the -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Martin Moss
> Sent: Tuesday, April 26, 2005 10:05 AM
> To: Martin Moss; perl-unix-users@listserv.ActiveState.com
> Subject: Re: [Perl-unix-users] XML:
documents you're parsing.
Also, I noticed that there are encoding methods in XML::LibXML::Common, but
I haven't used them.
- Mark.
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
That libnet package has nothing to do with Perl.
To install Perl modules or bundles you use CPAN (www.cpan.org). You'll need to download the libnet
bundle from CPAN (http://search.cpan.org/~gbarr/libnet-1.19/), extract it, then do:
sun> perl Makefile.PL
sun> make
sun> make test
sun> make in
-
Note that your nested hashes are simply indented lines in the YAML file.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
2525 Network Place
Herndon, VA 20171 USA
___
Perl-Uni
> The command for top 10 disk users would be:
> 'du -sk /export/home | sort -rn | head -10'
Slight correction (I should have tested it first)
du -sk /export/home/* | sort -rn | head -10
--
Mark Thomas
Internet Systems Architect
___
or top 10 disk users would be:
'du -sk /export/home | sort -rn | head -10'
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
2525 Network Place
Herndon, VA 20171 USA
_
figured out for the section between
> SCHEDULE and : because I have only one name but after
> that I'm not sure what to do.
You'll have to show us exactly what you mean by "name".
--
Mark Thomas
Internet Systems Architect
___
BA
> for (my $i = 001; $i < 100; $i++) {
>
> $padlen=3;
> $i = sprintf("%0${padlen}d",$i);
>
>print "$i\n";
> }
Slightly more compact:
printf("%03d\n", $_) for (1..100);
___
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
The default setting of File::Tail behaves the way you want. Perhaps that is
an easier solution.
- Mark.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, February 22, 2005 9:03 AM
> T
You can use XML::DOM or XML::LibXML as well as others, but first you'll have
to start with well-formed XML document (which your example is not). I prefer
XML::LibXML.
Say you have the following:
test
test
Then you can do this with XML::LibXML:
# Parse xml string (you c
> But what if I wanted to run a script remotely. i.e. I have
> a script on one server want to run it on files that exist on
> another server without having to use FTP to get the files and
> copy them to server which script resides on?
I use Net::Telnet for things like t
u do it?
FTP? Telnet? Some other protocol? Whichever it is, you can do the same thing
with Perl. You'll have to be more specific about what you're trying to
accomplish.
--
Mark Thomas
Internet Systems Architect
___
BAE SYSTEMS Information Technology
1B 4F for 7-bit controls)
PF1 SS3 P 8F 50
PF2 SS3 Q 8F 51
PF3 SS3 R 8F 52
PF4 SS3 S 8F 53
Note: These codes are also used by VT100 terminals.
---
Hope this helps.
--
Mark Thomas
Internet Systems Architect
___
rrectly--it is rude to the people who took valuable time to help you out.
You got several correct replies.
You got a full working example.
You got a pointer to a module with usage examples in the synopsis.
What else do you need?
- Mark.
___
Perl-U
u've specified the local file (which you
have), get returns the empty string. It's an odd interface that should be
changed, but what can you expect from a module version 0.08? :-)
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect DigitalNet, Inc.
your
under-the-hood serializer from several options (including Data::Dumper, XML,
etc)
Other modules you could look at include Storable and FreezeThaw.
- Mark.
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
them, but you may be
able to save yourself a lot of wheel-reinventing.
There's also a whole series of O'Reilly books on the subject of perl and
bioinformatics (http://bio.oreilly.com/).
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect Dig
Mehta, Perdeep wrote:
> Super! this works.
>
> I have one question, what are those spaces in between when I
> print as below, e.g.
It looks like you don't need an array. If you want just one long string,
replace
push @{$hash{$acc}}, $line;
with
$hash{$acc} .
$acc = $1 and next if ($line =~ s/^>(\S+)//);
push @{$hash{$acc}}, $line;
}
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect DigitalNet, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-
nts
That makes no sense. If you can read the file, you can extract the contents
from it. Are you in a 'sudo' jail where you are not allowed to run 'gunzip'?
Try Archive::Tar, which if IO::Zlib is installed, will be able to read the
files.
--
Mark Thomas
pass,Prompt=>':'); # old password
$t->cmd(String=>$newpass,Prompt=>':'); # new password
@result = $t->cmd(String=>$newpass);# new password again
print @result;
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECT
7;:');
@result = $t->cmd(String=>$passwd);
print @result;
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect DigitalNet, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
-Original Message-
From: [
n
> my script that had the "use Net::SSH::Perl" line in it but it
> said it "Can't locate Net/SSH/Perl.pm in @INC".
Any failed dependencies means the module will not install.
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect Di
> Does anyone knows off a module or way to modify the crontab
programmatically
Same way you would any other file. The files are in
/var/spool/cron/[username].
Alternately, you create your own crontab file, and issue a
crontab -u user [filename]
--
Mark Thomas[EM
The perl builtin getppid() will get the parent's process ID. You can then
use /bin/ps to get other information you may want.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 07, 2004 9:02 AM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-us
oing it, the delimiter is
> the very last piece of each one so when the program
> sees that it writes a new file.
I'd recommend using a real stream-based XML parser like SAX.
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect User Technology Associates
also write it @{$line} if
it's easier for you to understand.
- Mark.
P.S. The plural of matrix is matrices, not "matrix's"
> -Original Message-
> From: Bruce Hudson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 05, 2004 2:04 PM
> To: [EMAIL PROTECTED]
&
I don't see an error. I see a note giving you the solution to a potential
error.
Did you try 'make'?
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s
> Does anyone know what the format of the wtmp file is and
> if there is a perl module that will assist me processing
> this file?
This is the module that is designed for that purpose:
http://search.cpan.org/~mpiotr/User-Utmp-1.6/Utmp.pm
I have not used it personally. By the way, this was the fir
> I have an array of names. I need to find the corresponding
> index for a particular name. How can I do this?
If you need to do this often, or for a potentially large amount of names,
you may be better off starting with a hash of names instead.
--
Mark Thomas
becomes useless. So, does
$ctx have a unique property, per connection, which allows me to distinguish
it from others?
Much obliged,
- Mark
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
-enabled
Perl? Or is there perhaps another Perl Milter out there I could use?
Thanks,
- Mark
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
->header(-cookie=>$cookie);
my ($username, $passwd) = "";
my %cookies = parse CGI::Cookie($ENV{HTTP_COOKIE});
if (%cookies) {
if ($cookies{'log_in'}) {
($username, $passwd) = $cookies{'log_in'}->value;
print "My Cookie Test\n";
I wrote:
> echo "BLAH=VALUE ONE" | perl -anF'=' -e "print pop(@F)"
This is shorter:
echo "BLAH=VALUE ONE" | perl -pe "s/.*=//"
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Title: Message
another
way:
echo "BLAH=VALUE
ONE" | perl -anF'=' -e "print pop(@F)"
-Original Message-From: Markham, Richard
[mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003
1:54 PMTo:
[EMAIL PROTECTED]Subject: [Perl-unix-users]
perl equivalent to "cut"
how
router, you need some sort of agent installed that can respond
with the MAC address. An SNMP agent would work, and there may be something in
the Samba package that will work as well. Good luck.
--
Mark
Thomas
Thomas.Mark@bls.gov
Internet
Systems Architect User
lbox for EDI and the data needs to be transfered when it arrives.
If this is a mailbox, you could use a mail filter to send the files directly
as they are received. This way, you don't have any cron-related delays.
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Arch
Actually I would recommend the free Icecast (www.icecast.org), which is
Shoutcast-compatible and has a perl module, Net::Icecast, available on CPAN.
--
Mark Thomas |_|
Internet Systems Architect-+-
User Technology Associates, Inc. |
[EMAIL PROTECTED
> Use grep:
>
> @colors = ('red', 'yellow', 'green');
> $var = 'green';
> print "yep" if grep /$var/, @colors;
On second thought, this answer is not ideal in your simple case. This checks
every element and is really oriented to
How could I realise this code in perl?
Use grep:
@colors = ('red', 'yellow', 'green');
$var = 'green';
print "yep" if grep /$var/, @colors;
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems A
Integer, you say? How about something real trivial, not using regex, like
"int ()"? :)
$a = '77';
if (int ($a)) {
print "Yes\n";
} else {
print "No\n";
}
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understa
use Net::Telnet, I use it to connect to a HP Tandem main frame for days
at a time.
- Mark
On Wed, 2003-01-29 at 14:23, Shafi wrote:
> Hi Guys,
>
> I am trying to write a perl script which can telnet to a HP m/c continously
> for a period of 3 mins. Could someone help me out in this.
ut $string3, I get
>900/00/2.3
>any ideas?
Missing at least 2 things...
use strict;
and
escaping the "." (\.) in your regex..
Mark
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
e error before ')' token
FAM.c: In function `XS_FAMEventPtr_hostname':
FAM.c:762: `FAMEvent' undeclared (first use in this function)
FAM.c:762: `fe' undeclared (first use in this function)
FAM.c:768: parse error before ')' token
FAM.c: In function `XS_FAMEventPtr_filename':
FAM.c:787: `FAMEvent' undeclared (first use in this function)
FAM.c:787: `fe' undeclared (first use in this function)
FAM.c:793: parse error before ')' token
FAM.c: In function `XS_FAMEventPtr_code':
FAM.c:812: `FAMEvent' undeclared (first use in this function)
FAM.c:812: `fe' undeclared (first use in this function)
FAM.c:813: storage size of `RETVAL' isn't known
FAM.c:818: parse error before ')' token
make: *** [FAM.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
I know that the FAM demon is installed and running. When I do fam --v as
root I get
fam, version 2.6.8
Any Ideas?
- Mark
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
ely small
difference in timings), but I doubt that.
Any suggestions will be appreciated.
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
I attempted to install SGI:FAM using the CPAN module. It failed with fatel
errors. It also fails when I try to compile it manualy. Im using RedHat 8.0
with the FAM deamon already installed by default.
Is SGI::FAM from CPAN inteaded to be installed on Linux or just IRIX?
- Mark
[EMAIL
ested in a cross platform solution.
Mark Mitchell
Happy New Years All!
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
se this, or where to go looking.
Appreciate reference to any specific areas to R in the FM, or other
direction.
TIA,
Mark Sutfin
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
The file is 201K in size and 3,260 lines long - the part that confuses Perl
is at line 102.
-Original Message-
From: Martin Moss [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 7:22 AM
To: Mark Breslauer; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: Mark Breslauer
Subject: Re
All -
I'm writing a script to gather date from a large number of text log files
and I've encountered an interesting problem. I've noticed that control
characters that appear in some of the log files are being interpreted as
indicating EOF - preventing the script from processing the rest of the f
When I try to telnet using Net::Telnet, I get the following error:
"Type unknown unknown
Obsolete or generic terminal type: 'dumb'
Enter new terminal type, or press to accept current one:"
I tried to add a line;
"print $telnet->cmd('dumb');"
or even:
"print $telnet->cmd('\n');"
but it d
ned ($from_client = <$client>)"
loop in the first example, which is totally unacceptable.
Ideally, I want to check whether the client has input, not using the wait
"while (defined ($from_client = <$client>)" of the first
Hello,
I just joined the list and am rather new to Perl in general. I have written
a script that seems to be error free but there is a problem.
The e-mail is sent with the From line of $from and the To line of $to.
Here is the script... can anyone tell me why this isn't working properly?
Than
urse. My apologies for the incorrect
suggestion.
-Mark Beihoffer
___
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
Hello, Mr. Zalewski,
I just checked one of my scripts that uses Net::Telnet, and I invoked the
package without parentheses, a la
use Net::Telnet;
rather than the way you have it,
use Net::Telnet ();
so perhaps give that a try? Cheers,
-Mark Beihoffer
Network Architect
http://perlmonks.com
Of course this is only true if the .htr extension application is
available...
-Original Message-
From: Cumhur KIZILARI <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>;
[EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Tuesday, January 09, 2001 6:25 AM
Subject: Important
>From
>h
71 matches
Mail list logo