comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  looking for efficient way to parse a file         


Author: Eric Martin
Date: Jan 12, 2008 13:40

Hello,

I have a file with the following data structure:
#category
item name
data1
data2
item name
data1
data2
#category
item name
data1
data2
... etc.

Any line that starts with #, indicates a new category. Between
categories, there can be any number of items, with associated data.
Each item has exactly two data properties.
Show full article (0.57Kb)
3 Comments
  Ip-In-IP Encapsulation         


Author: simone.romano82
Date: Jan 12, 2008 13:27

Hi,
I'm writing a script PERL for ip-in-ip encapsulation.
I could give multicast packet over udp connection encapusalate it and
send it to peer destination.

I'll use the NetPacket::UDP module.

Think you that it is a good idea? Help and idea for the problem are
welcome....

Thanks in advance...
Simo
no comments
  How to make COPY of Worksheet(1) to some other Worksheet ???         


Author: Katja
Date: Jan 12, 2008 13:09

How to make COPY of Worksheet(1)to some other Worksheet ???

Please Help!

------------------
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
$Win32::OLE::Warn = 3; # die on errors...
# get already active Excel application or open new
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $Book = $Excel->Workbooks->Open('d:\cgi\work.xls');
my $Sheet = $Book->Worksheets(1);

# How to make COPY of Worksheet(1) to some other Worksheet ???
#

$Book->Save;
------------------
1 Comment
  FAQ 8.18 How can I do an atexit() or setjmp()/longjmp()? (Exception handling)         


Author: PerlFAQ Server
Date: Jan 12, 2008 12:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.18: How can I do an atexit() or setjmp()/longjmp()? (Exception handling)

Release 5 of Perl added the END block, which can be used to simulate
atexit(). Each package's END block is called when the program or thread
ends (see perlmod manpage for more details).

For example, you can use this to make sure your filter program managed
to finish its output without filling up the disk:

END {
close(STDOUT) || die "stdout close failed: $!";
}

The END block isn't called when untrapped signals kill the program,
though, so if you use END blocks you should also use

use sigtrap qw(die normal-signals);
Show full article (2.21Kb)
no comments
  Perl and C communication         


Author: simone.romano82
Date: Jan 12, 2008 09:24

Hi
I'm new in Perl language...

I have an important question: Perl and C can communicate ?

My problem is the following: I have Perl script (client) that could
receive information ( via UDP connection) from a C program ( the
server).
Is it this possible? there are a method for client e server to
communicate??

Thanks in advance
Simo
3 Comments
  Simple "rm -rf"?         


Author: Bernie Cosell
Date: Jan 12, 2008 06:04

I want to nuke a temp directory. The very simplest way to do it is
system("rm", "-rf", TEMPDIR), but I'm wondering if there's a perlish way to
do it that'd be about as easy. The only thing that comes to mind is a bit
of a mess, using File::Find and unlink'ing and rmdir'ing [as appropriate]
what you run into. Tnx...

/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
9 Comments
  FAQ 8.35 How do I close a process's filehandle without waiting for it to complete?         


Author: PerlFAQ Server
Date: Jan 12, 2008 06:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.35: How do I close a process's filehandle without waiting for it to complete?

Assuming your system supports such things, just send an appropriate
signal to the process (see "kill" in perlfunc). It's common to first
send a TERM signal, wait a little bit, and then send a KILL signal to
finish it off.

--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.29Kb)
no comments
  How can a non-privileged user find the NIC speeds?         


Author: Mark Seger
Date: Jan 12, 2008 05:24

Does anyone know how to determine the NIC speed by non-privileged users?
I want to be able to do this from perl and can't find any data
structures in /proc and /sys, but then again there are an awful lot of
them and could be easy to miss in an obscure place. I usually use
ethtool for this but it requires privs.
-mark
no comments
  FAQ 8.2 How come exec() doesn't return?         


Author: PerlFAQ Server
Date: Jan 12, 2008 00:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.2: How come exec() doesn't return?

Because that's what it does: it replaces your currently running program
with a different one. If you want to keep going (as is probably the case
if you're asking this question) use system() instead.

--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.22Kb)
no comments