David Monarres writes ..
>I am alos fairly new with perl and completely new with perl one liners.
>I see how you can use regex's on the cmd line to edit a file (sort of
>sed ish). I tried this
>
>$ perl -pe 's/hello/reverse($1)/' -i test
>
>all it print's is reverse. I was wondering if you knew
Helio S. Junior writes ..
>I have a HTML Page in our Intranet. This page contains
>some tables which i have to update from time to time.
>
>The information i have to add to the tables on this
>page comes from OutLook e-mails.
>
>I would like to add a button on this Page in order to
>read OutLook
I am alos fairly new with perl and completely new with perl one liners. I
see how you can use regex's on the cmd line to edit a file (sort of sed
ish). I tried this
$ perl -pe 's/hello/reverse($1)/' -i test
all it print's is reverse. I was wondering if you knew of a way to read in
a word and rev
Hello,
I have a HTML Page in our Intranet. This page contains
some tables which i have to update from time to time.
The information i have to add to the tables on this
page comes from OutLook e-mails.
I would like to add a button on this Page in order to
read OutLook e-mails and update this p
Thanks for the advice. I would've thought about that sooner or later, but
better sooner than later. And this is not on a high traffic site, in fact
only a few select folks know about it. Anyhow, hows this...
my $manpage = param("manpage");
if ($manpage =~ /^([-\@\w.]+)$/) {
Casey West writes ..
>On Wed, May 02, 2001 at 05:37:27PM -0400, Casey West wrote:
>: On Wed, May 02, 2001 at 03:16:41PM -0700, Peter Lemus wrote:
>: : Hi,
>: : I'm having some trouble trying to execute the followin
>: : command from a perl script.
>: : rmdir /s /q username #this works from the
Mike Stussie writes ..
>thanks for the response... let me clarify the description of
>file 'B'
>
>File 'B' record format is exactly like file 'A', both look like this:
>(btw - the file is a registrant file for a newsletter)
>
>File 'A'
>BCSJN::Joe User::1
>N.Main::Anytown::MO::None::Unknown
Ok ...after the #!/usr/bin/perl ... fix
the next thing to check for is ^M
this is the extra CR that Windoze editors leave behind ...
you can open this file up on a linux box using fox-editor
it will show any offending ^M's delete them ...then try again ...
regards
SunDog
==
> -f and -M > 0 or push @logs_old, $_ ;
oops, that should of course have been:
-f and (-M >= 0 or push @logs_old, $_ );
Ask Bjoern Hansen writes ..
>On Mon, 30 Apr 2001, Meije Oppenhuizen wrote:
>
>> I am probably doing something very wrong here, but can
>someone tell me
>> why
>>
>> #!/usr/bin/perl -w
>>
>> use File::Find;
>>
>> print "$arg";
>> open(LISTFILE, "> /home/meyeo/testfile") or die "Can't open the
At 06:44 PM 5/2/2001, you wrote:
>Can anyone help me understand why the following code is being ignored?
>
>$my_graph->set_x_label_font(GD::Font->Giant);
>
>Kevin
Need more code! It's like saying "Why doesn't this print?"
print 'Print this!';
What I didn't show you was that earlier in my progr
Ask Bjoern Hansen writes ..
>On Fri, 27 Apr 2001, Billy Joedono wrote:
>
>[...]
>> Convert to regular Unix format and problem solved! More
>question: how can I
>> force vi to show these, or better yet, how can I get
>dos2unix or unix2dos
>> in Linux?
>
>perl -i -pe 's/\r\n/\n/' file_to_be_con
Joe McMahon writes ..
>On Wed, 2 May 2001, J. Patrick Lanigan wrote:
>
>> I am getting an "Internal Server Error" returned to my
>browser. The error
>> log shows the following:
>>
>> "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10]
>Premature end of
>> script headers: /path/to/filenam
Hi,
Thanks for that.
Iam collecting /etc/passwd files from a large number of unix systems and
generating the list of UIDs.Out of this list, I want to pick up the next
available UID.
When I generate the list, there will be lot of duplicate UIDs, which I want
to get rid of.
I hope that explains.
At 08:42 AM 5/2/2001, you wrote:
> I am working on automating some file imports from a file that are
> saved on a server to a database on a local machine. It gets a bit ugly
> because we need to run the text file through a conversion program from a
> vendor before it gets imported into
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
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!
~Matt C.
--- [EMAIL P
Can anyone help me understand why the following code is being ignored?
$my_graph->set_x_label_font(GD::Font->Giant);
Kevin
On Wed, May 02, 2001 at 05:37:27PM -0400, Casey West wrote:
: On Wed, May 02, 2001 at 03:16:41PM -0700, Peter Lemus wrote:
: : Hi,
: : I'm having some trouble trying to execute the followin
: : command from a perl script.
: : rmdir /s /q username #this works from the command line
: : in win2k.
:
On Wed, May 02, 2001 at 03:16:41PM -0700, Peter Lemus wrote:
: Hi,
: I'm having some trouble trying to execute the followin
: command from a perl script.
: rmdir /s /q username #this works from the command line
: in win2k.
: I tried:
: system 'rmdir /s /q $user' # no luck. Any
: suggestion
Hi,
I'm having some trouble trying to execute the followin
command from a perl script.
rmdir /s /q username #this works from the command line
in win2k.
I tried:
system 'rmdir /s /q $user' # no luck. Any
suggestions?
=
Peter Lemus
Computer Networks Engineer
[EMAIL PROTECTED]
My Dad
On Wed, May 02, 2001 at 04:20:49PM -0500, J. Patrick Lanigan ([EMAIL PROTECTED])
spew-ed forth:
[snip]
> my $manpage = param("manpage");
> my @output = `man $manpage | perl -pe 's/(?:.\cH)//g'`; #Thanks Paul
Please read perlsec and untaint $manpage (by hand, or with
> I want to list all files only within a directory
> (do not descend to sub-directories).
> [and catch log files needing to be added]
How about something like:
$^T = $last_full_log_seconds;
while (glob $logs)
{
-f and -M > 0 or push @logs_old, $_ ;
}
$^T is the start tim
On Wed, May 02, 2001 at 09:00:27PM +0200, M.W. Koskamp wrote:
>
> - Original Message -
> From: David H. Adler <[EMAIL PROTECTED]>
> > For what it's worth two ideas present themselves to me.
> >
> > --code
> >
> > use Benchmark;
> >
> > $x = "huzzah!";
> > $times = shift || 10
This is what I found.
ls -la /opt/perl5/lib/5.6.1/PA-RISC1.1/auto/File/
total 2
drwxr-x--- 3 vobadm nfsgroup96 May 2 15:42 .
drwxr-x--- 21 vobadm nfsgroup 1024 May 2 15:42 ..
drwxr-x--- 2 vobadm nfsgroup96 May 2 15:42 Glob
ls -la /opt/perl5/lib/5.6.1/PA
Man, this list rocks, and I am really atarting to love this language. Thanks
for all your suggestions. Ultimately, Paul is the winner :) The code follows
works wonders:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print header(), start_html("Online Manpag
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, 2 May 2001, Kailash Subramanian wrote:
>
>
> But I see the module.
> $ ls -l /opt/perl5/lib/5.6.1/PA-RISC1.1/File
Wrong directory - it's not looking for the .pm file, it's looking for the
.so (or whatever other extension) file that's compile
Infact now I changed the perl installation directory to the one under
/opt, but now I am getting another error.
/home/xena/vobadm/PERL/perl/perl-RUN/opt/perl5/bin/perl Makefile.PL
Checking if your kit is complete...
Looks good
Can't locate loadable object for module File::Glob in @INC (@INC
con
On Wed, May 02, 2001 at 02:59:04PM -0400, Timothy Kimball wrote:
>
> : > substring => sub {for (0..length($x) - 1){$q = $_ }}
>
> This one isn't getting the characters from the string, it's just
> counting from zero to one less than the length of the string.
Dang. that was meant to be C<$q =
--- Casey West <[EMAIL PROTECTED]> wrote:
> On Wed, May 02, 2001 at 03:12:23PM -0500, J. Patrick Lanigan wrote:
> : Thanks to Paul and Mike for the quick response.
> :
> : Now, does anyone know how I can trim out the unwanted charecters
> from the
> : output of a man page so that I can display i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, 2 May 2001 [EMAIL PROTECTED] wrote:
>
>
>
> All,
> I am trying to install a perl module on HP-UX. So when I run the following
> command I am getting an error as shown below. I know that perl is looking under
> wrong dir for this module.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, 2 May 2001, rmd wrote:
> HELP, please!
> I´ve tried to install DBD:DB2 using CPAN or compiling it directly via
> perl Makefile.PL, then make test and i get always this error:
Note that DBD::DB2's README file specifically requires that the DB
I'm not sure what you are saying your problem is,
and I may have this wrong, but since no one else
has answered, I'll have a go.
To generate a new, anonymous hash that is a
copy of an existing named hash, use {}.
Put the {} brackets around some expression that
can be seen by perl as a hash, eg:
But I see the module.
$ ls -l /opt/perl5/lib/5.6.1/PA-RISC1.1/File
total 26
-rw-r- 1 vobadm nfsgroup 12808 Apr 14 07:48 Glob.pm
Thx
Kailash
From: [EMAIL PROTECTED] (Casey West) AT INTERNET on 05/02/2001 03:31
PM
To: Kailash Subramanian/ATL/ALLTELCORP
cc: [EMAIL PROTE
On Wed, May 02, 2001 at 04:30:08PM -0400, [EMAIL PROTECTED] wrote:
:
:
:
: All,
: When I run this command, I get the following error message.
: $ perl Makefile.PL
: Checking if your kit is complete...
: Looks good
: Can't locate loadable object for module File::Glob in @INC (@INC contains:
On Wed, May 02, 2001 at 03:12:23PM -0500, J. Patrick Lanigan wrote:
: Thanks to Paul and Mike for the quick response.
:
: Now, does anyone know how I can trim out the unwanted charecters from the
: output of a man page so that I can display it in a browser?
Well, you could use the man2html utili
This group is great, but sometimes deja's still the best source! ;>
http://groups.google.com/groups?q=%22man+output%22+perl
> Now, does anyone know how I can trim out the unwanted charecters from
the
> output of a man page so that I can display it in a browser?
>
> Sample as is:
>
> NNAAMMEE
All,
When I run this command, I get the following error message.
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Can't locate loadable object for module File::Glob in @INC (@INC contains:
/opt/perl5/lib/5.6.1/PA-RISC1.1 /opt/perl5/lib/5.6.1
/opt/perl5/lib/site_perl/5.6.1/
Thanks to Paul and Mike for the quick response.
Now, does anyone know how I can trim out the unwanted charecters from the
output of a man page so that I can display it in a browser?
Sample as is:
NNAAMMEE
ls - list directory contents
SSYYNNOOPPSSIISS
llss [_O_P_T
On Wed, May 02, 2001 at 11:11:20AM -0700, Paul wrote:
:
: --- "M.W. Koskamp" <[EMAIL PROTECTED]> wrote:
: > > : open FH, "lines.txt" || die $!;
: > > : my %uniq;
: > > : map{$uniq{$_}=1 and print $_ unless $uniq{$_} };
:
: lol -- one better(ish):
: print map { $uniq{$_} ? '' : $uniq{$_}=$_
yep -- and backticks sets $? with the return code as well, so you get both
if you want.
- Original Message -
From: "Paul" <[EMAIL PROTECTED]>
To: "J. Patrick Lanigan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:47 PM
Subject: Re: system call question
>
> ---
--- "J. Patrick Lanigan" <[EMAIL PROTECTED]> wrote:
> Now that I have CGI working with apache on my server, I am
> experimenting.
> Anyhow, I wrote the following script and was wondering how to capture
> the output of a system call. I am trying to capture the output so
that
> I can format it for
--- Paul Cotter <[EMAIL PROTECTED]> wrote:
> There are many ways, here is one that does not involve an array
>
> my $str = 'paul cotter';
> print $1,$1 while ( $str =~ /^(.)/g );
>
> The above prints ppaauull ccooeerr (just to show it is printing
> 1 at a time - twice).
nope -- /^(.)/ is
> "how do I tell perl to open a file for reading, do various
> commands, and then output those changes to a new file"???
Perl has some great one-liner shortcuts for writing filters.
First, -e lets you put perl on the command line:
perl -e ' print "foo\n" '
Prints
foo
Second, -p conve
Patrick,
Put your command in backticks and set a variable to its output (like this
$var = `man $manpage`;)
- Original Message -
From: "J. Patrick Lanigan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:25 PM
Subject: system call question
> Now that I have C
Now that I have CGI working with apache on my server, I am experimenting.
Anyhow, I wrote the following script and was wondering how to capture the
output of a system call. I am trying to capture the output so that I can
format it for the browser.
#!/usr/bin/perl -w
use strict;
use CGI qw(:standa
> beginner ... recommended books other than the camel ...
Apparently, the original Camel had two chapters that
beginners would love -- "Common Tasks in Perl" and
"Real Perl Programs".
Later Camels removed this sort of material.
The essence of this material, greatly expanded and
wonderfully edit
There are many ways, here is one that does not involve an array
my $str = 'paul cotter';
print $1,$1 while ( $str =~ /^(.)/g );
The above prints ppaauull ccooeerr (just to show it is printing 1 at a
time - twice).
It is going therough $str one character at a time seeing if it matches "."
w
: > substring => sub {for (0..length($x) - 1){$q = $_ }}
This one isn't getting the characters from the string, it's just
counting from zero to one less than the length of the string.
-- tdk
- Original Message -
From: David H. Adler <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:46 PM
Subject: Re: String deconstruction?
> On Wed, May 02, 2001 at 11:28:14AM -0700, Ross Larner wrote:
> > Hello. I am attempting to print a string one character at a
I always use Net::SMTP - very good module.
Mike
Mike Lacey
www.tek-tips.com -- a friendly, flame free, environment for computer
professionals and students
Perl forum at:
http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/219
- Original Message -
From: "Phillip Bruce" <[EMAIL P
On Wed, May 02, 2001 at 11:28:14AM -0700, Ross Larner wrote:
> Hello. I am attempting to print a string one character at a time. Right now I am
>using one while loop with chop to create a new string, the reverse of the original
>string, then another while loop with chop on the reversed string
Ross Larner <[EMAIL PROTECTED]> wrote:
>Hello. I am attempting to print a string one character at a time.
>Right now I am using one while loop with chop to create a new string,
>the reverse of the original string, then another while loop with chop
>on the reversed string to print out the characte
All,
I am trying to install a perl module on HP-UX. So when I run the following
command I am getting an error as shown below. I know that perl is looking under
wrong dir for this module. I am trying to use my own perl under my home dir.
There is also another perl installation directory und
: Hello. I am attempting to print a string one character at a time. Right now I am
:using one while loop with chop to create a new string, the reverse of the original
:string, then another while loop with chop on the reversed string to print out the
:characters. I'm sure there's a more stra
print join "\n", split "", "abcdefg";
split will give you a list where "abcdefg" is splitted on nothing.
so it will contain (a,b,c,d,e,f,g).
Join "\n" will join the items in the list with newlines between em.
So it will print:
a
b
c
d
e
f
If you want to reuse the array do this:
my @chars = spli
--- Ross Larner <[EMAIL PROTECTED]> wrote:
> Hello. I am attempting to print a string one character at a time.
> Right now I am using one while loop with chop to create a new string,
> the reverse of the original string, then another while loop with chop
> on the reversed string to print out th
: I am also a beginner and wondering if there are any other recommended
: books other than the camel book from O'Reilly. I have been asked to
: display information from the Oracle Database on the web using Perl and
: CGI. So far, I mostly know how to check for patterns. Gulp!!
O'Reilly has al
--- [EMAIL PROTECTED] wrote:
> I am also a beginner and wondering if there are any other recommended
> books other than the camel book from O'Reilly. I have been asked to
> display information from the Oracle Database on the web using Perl
> and CGI. So far, I mostly know how to check for patte
Hello. I am attempting to print a string one character at a time. Right now I am
using one while loop with chop to create a new string, the reverse of the original
string, then another while loop with chop on the reversed string to print out the
characters. I'm sure there's a more straight-f
Programming the perl DBI would be a good book. Also learning perl from
O'reilly is fairly good.
If you get perl from activestate.com you get the perl documentation in html
format. Very good and worth reading.
Try read the different tutorials. I suggest perlsyn, perlop, and perl sub.
Also make a n
--- "M.W. Koskamp" <[EMAIL PROTECTED]> wrote:
> > : open FH, "lines.txt" || die $!;
> > : my %uniq;
> > : map{$uniq{$_}=1 and print $_ unless $uniq{$_} };
lol -- one better(ish):
print map { $uniq{$_} ? '' : $uniq{$_}=$_ } ; #:op
__
Do You Ya
I am also a beginner and wondering if there are any other recommended
books other than the camel book from O'Reilly. I have been asked to
display information from the Oracle Database on the web using Perl and
CGI. So far, I mostly know how to check for patterns. Gulp!!
Thanks for any input.
O
--- n6tadam <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I wonder if someone could help me. I have been programming in bash
> for years
> now, but I have decided that I would like to use perl.
>
> My question is: "how do I tell perl to open a file for reading, do
> various commands, and then outp
- Original Message -
From: Casey West <[EMAIL PROTECTED]>
To: M.W. Koskamp <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; cherukuwada subrahmanyam <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 6:45 PM
Subject: Re: eliminating duplicate lines in a file
> On Wed, Ma
brahmanyam <[EMAIL PROTECTED]> wrote:
: > Hi,
: > Iam reading flat text file of 10 lines. Each line has got data of
: > maximum 10 characters.
: > I want to eliminate duplicate lines and blank lines out of that file.
: > i.e. something like sort -u in unix.
:
: Got plenty of memory? =o)
:
:
On Wed, May 02, 2001 at 07:39:03PM +0200, M.W. Koskamp wrote:
:
: - Original Message -
: From: Paul <[EMAIL PROTECTED]>
: To: cherukuwada subrahmanyam <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
: Sent: Wednesday, May 02, 2001 7:08 PM
: Subject: Re: eliminating duplicate lines in a file
:
HELP, please!
I´ve tried to install DBD:DB2 using CPAN or compiling it directly via perl
Makefile.PL, then make test and i get always this error:
[root@linux DBD-DB2-0.75]# make test
make[1]: Entering directory '/instalar/DBD-DB2-0.75/Constants'
make[1]: Leaving directory '/instalar/DBD-DB2-0.75
- Original Message -
From: Paul <[EMAIL PROTECTED]>
To: cherukuwada subrahmanyam <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 7:08 PM
Subject: Re: eliminating duplicate lines in a file
>
> --- cherukuwada subrahmanyam <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Ia
--- Peter Lemus <[EMAIL PROTECTED]> wrote:
> HI Folks,
>
> I need to delete some directories, specified in
> removedir.txt, I'll like to check whether the file
> exists or not, if it doesn't I need to print file has
> been deleted. this is what I've done so far.
>
> use file::spec;
> use win32
--- cherukuwada subrahmanyam <[EMAIL PROTECTED]> wrote:
> Hi,
> Iam reading flat text file of 10 lines. Each line has got data of
> maximum 10 characters.
> I want to eliminate duplicate lines and blank lines out of that file.
> i.e. something like sort -u in unix.
Got plenty of memory? =o)
On Wed, 2 May 2001, J. Patrick Lanigan wrote:
> I am getting an "Internal Server Error" returned to my browser. The error
> log shows the following:
>
> "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] Premature end of
> script headers: /path/to/filename"
>
> I have set the directory and
At 07:57 AM 5/2/2001, you wrote:
>Hi,
>Iam reading flat text file of 10 lines. Each line has got data of
>maximum 10 characters.
>I want to eliminate duplicate lines and blank lines out of that file.
>i.e. something like sort -u in unix.
>
>
>
>Is there any easy way of doing it in perl???
>th
Read the documentation in IO::Handle and FileHandle
- Original Message -
From: n6tadam <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 1:27 PM
Subject: I am a real begginer to perl..
> Dear All,
>
> I wonder if someone could help me. I have been programming
Thank you, Thank you, Thank you!!
I did everything you said and it worked. So, I wanted to find out what
specifically the problem was. Turns out it was the absense of the -w switch
on the shebang.
Thanks again,
Patrick
> Gary Stainburn wrote:
>
> Hi Patick,
>
> You say you've set the permission
> There is no CASE statement in PERL. Instead you use something called
SWITCH.
There is no switch either - and if there was it would be lower case. There
are many ways to emulate it; here is but one:
:HOMOSTART# this is just a label - it can be ignored
$_ = $caseVar;
/^man$/and
At 07:07 AM 5/2/2001, you wrote:
>I've written a script to FTP files. I've included the Net::FTP package but
>when I run the script in 2 different machines, I get these 2 error messages:
>
>machine 1
>Can't locate object method "new" via package "Net::FTP::A" at
>/usr/local/lib/per
>l5/5.00503/Net
At 03:03 PM 5/1/2001, you wrote:
>Does anyone know of a way to use perl and CGI to have the following:
>
>html page w/ form to get stdin from the user for username and
>password.(basic),
>pass the variables to the perl script which then modifies permissions for a
>specific folder on NT
>and allows
Hi,
I am passing a directory into my perl program. I want to list all
files only within that directory (do not descend to sub-directories). I
have tried using the File::Find::find command but to no avail.
Here are some code snippets:
xi#!/usr/bin/perl -w
##
Hi there!
Is there someone, who knows how to manage the access rights configuration of
a shared NT-Directory via perl?
I already found a working perl script at CPAN which is able to change the
access rights on the local hard disk, but what I always do via the GUI of NT
is changing the access rig
Dear List,
I would just like to say thank you to all the people who help me with
getting perl to open to and read a file. I know that this is such a simple
thing to do, but having someone else explain it, definately clarified it for
me :-)))
Thanks Again,
Regards,
Thomas Adam
Please note that
thanks for the response... let me clarify the description of file 'B'
File 'B' record format is exactly like file 'A', both look like this:
(btw - the file is a registrant file for a newsletter)
File 'A'
BCSJN::Joe User::1 N.Main::Anytown::MO::None::Unknown::[EMAIL PROTECTED]
File 'B'
JK
You can try this old trick:
# where @data is from flatfile
%seen = ();
@uniq = (); #will contain only unique elements
foreach $item(@data) {
unless($seen{$item}) {
$seen{$item} = 1;
if ($item =~ /\S+/g) {
push(@uniq,
I am working on automating some file imports from a file that are saved on
a server to a database on a local machine. It gets a bit ugly because we
need to run the text file through a conversion program from a vendor before
it gets imported into the DB, and this conversion utility requ
#open file for reading
open (READ, "file2.txt");
# you'll then have to loop through
# the READ file with a foreach loop
# or a while loop to perform
# "various commands"
while () {
#perform command
# Then write to the file
print WRITE "$value\n";
}
close(READ);
close(WRITE);
Greg
Andrew Teo ([EMAIL PROTECTED]) wrote:
> Just curious, how would you send an attachment?
Get MIME::Lite from CPAN.
--
If we fail, we will lose the war.
Michael Lamertz | [EMAIL PROTECTED] / [EMAIL PROTECTED]
Nordstr. 49 | http://www.lamertz.net
507
Hi,
Iam reading flat text file of 10 lines. Each line has got data of
maximum 10 characters.
I want to eliminate duplicate lines and blank lines out of that file.
i.e. something like sort -u in unix.
Example:
if the file contains:
abcdef
dfsdf
abcdef
dfsdf
12334
Then the output should be:
I've written a script to FTP files. I've included the Net::FTP package but
when I run the script in 2 different machines, I get these 2 error messages:
machine 1
Can't locate object method "new" via package "Net::FTP::A" at
/usr/local/lib/per
l5/5.00503/Net/FTP/A.pm line 18.
machine2
Can't loca
Hans ([EMAIL PROTECTED]) wrote:
> Someone please enlighten me. I can't for the world figure out what is
> wrong here.
Your understanding of the packer is wrong :-)
> - I create a main window.
>
> - In this window I create a frame.
You don't need a frame that covers the whole window - except fo
Dear All,
I wonder if someone could help me. I have been programming in bash for years
now, but I have decided that I would like to use perl.
My question is: "how do I tell perl to open a file for reading, do various
commands, and then output those changes to a new file"???
Thanks in Anticipati
Hi,
I am having a small problem while parsing the XML code. First of all, here
comes snip of the sourcecode:
...
if ( $NN->[$j] eq "OBU" ) # if OBU was found...
{
$OBU = $NN->[$j+1];
for $e ( 0..@$OBU ) # loop through the content of OBU
{
if ( ref($OBU->[$e]) eq "HASH" )
{
$
Hi,
Try using libnet, this is a library that allows you to use ftp, telnet etc
from Perl. Avzilable from CPAN or using PPM.
Regards,
Nigel R
Gary Stainburn wrote:
> Hi Daniel,
>
> assuming you're not worried about the ftp failing, you could do
> something line:
>
> open(FTP,"|ftp -ivn")|| die
Hi Daniel,
assuming you're not worried about the ftp failing, you could do
something line:
open(FTP,"|ftp -ivn")|| die can't fork ftp: $!\n;
print FTP "open ftp.me.com\n";
print FTP "user me mypassword\n";
print FTP "put myfile\n";
print FTP "get theirfile\n";
print FTP "bye\n";
close(FTP);
Ho
Hi Patick,
You say you've set the permissions for the dir and the script to 755.
Have you checked the permissions for the parent directories?
Also, put the '-w' on the perl line, and 'use strict'.
lastly, put the following line as the 1st statement in the script
print STDERR "\nGot this far\n
On Mon, 30 Apr 2001, Meije Oppenhuizen wrote:
> I am probably doing something very wrong here, but can someone tell me
> why
>
> #!/usr/bin/perl -w
>
> use File::Find;
>
> print "$arg";
> open(LISTFILE, "> /home/meyeo/testfile") or die "Can't open the ffin
> thingy!";
> print LISTFILE "\n";
>
On Fri, 27 Apr 2001, Billy Joedono wrote:
[...]
> Convert to regular Unix format and problem solved! More question: how can I
> force vi to show these, or better yet, how can I get dos2unix or unix2dos
> in Linux?
perl -i -pe 's/\r\n/\n/' file_to_be_converted_to_unix_lines.txt
perl -i -pe 's/\
96 matches
Mail list logo