Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Dr.Ruud
Rob Dixon schreef: > perl -e "print qq($_\n) foreach <*>" which as good as identical to perl -wle "print for <*>" -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl sort query

2007-06-18 Thread John W. Krahn
pauld wrote: I want to sort a hash of hash by date&time and then extract some of the data. From the data ive got i can contruct a key that is mmddhhmm and i do this ##error trap absent entries if ($endan=~m/\d{2}:\d{2}\s+\d{2}/ && $stan=~m/\d{2}:\d{2}\s+\d{2}/ ) {my %daylist; #

Re: Command line usage [solved]

2007-06-18 Thread John Degen
> > >- Original Message >From: Paul Lalli <[EMAIL PROTECTED]> >To: beginners@perl.org >Sent: Monday, June 18, 2007 6:47:05 PM >Subject: Re: Command line usage > >On Jun 18, 10:50 am, [EMAIL PROTECTED] (John Degen) wrote: > >> I think I'm out of luck with this OS;) Your suggestion for creat

perl sort query

2007-06-18 Thread pauld
I want to sort a hash of hash by date&time and then extract some of the data. >From the data ive got i can contruct a key that is mmddhhmm and i do this ##error trap absent entries if ($endan=~m/\d{2}:\d{2}\s+\d{2}/ && $stan=~m/\d{2}:\d{2}\s+\d{2}/ ) {my %daylist; ##split start and

Help with compiling perl DBD using Oracle Instant client

2007-06-18 Thread Ravi Malghan
Hi: I have installed the oracle instant client and trying to install DBD-Oracle. When I run perl MakeFile, I get the following. = Using Oracle in /export/home/netcool/oracle DEFINE _SQLPLUS_RELEASE = "1002000300" (CHAR) Oracle version 10.2.0.3 (10.2) Unable to locate

Inter-thread communications

2007-06-18 Thread Bob McConnell
This is an offshoot of the thread "Having trouble porting an application to MS-Windows". This time I am looking at using fork() to separate input and output handling. But I am not sure how some of the IPC handling works in the Win32 environment. I am trying to emulate the behavior of an existing P

Re: Command line usage

2007-06-18 Thread Paul Lalli
On Jun 18, 10:50 am, [EMAIL PROTECTED] (John Degen) wrote: > I think I'm out of luck with this OS;) Your suggestion for creating a backup > file gave the same result: no error, no change in the files. The output of > 'perl -le"print for @ARGV" *' is * and the other is *.*. Funny though that > sed

Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Rob Dixon
Octavian Rasnita wrote: Rob Dixon wrote: John Degen wrote: I'm using Perl 5.8.8 from ActiveState on Windows XP. I'm trying to accomplish a search and replace in a number of files in the same directory from the command line (cmd.exe). The problem is that the command perl -i -e "s/old/new/" *

Re: Why must I chomp a variable set in a script? (Problem Solved)

2007-06-18 Thread Jefferson Kirkland
-- Forwarded message -- From: Jefferson Kirkland <[EMAIL PROTECTED]> Date: Jun 18, 2007 10:45 AM Subject: Re: Why must I chomp a variable set in a script? (Problem Solved) To: Paul Lalli <[EMAIL PROTECTED]> Paul, On 6/18/07, Paul Lalli <[EMAIL PROTECTED]> wrote: On Jun 18, 8:48

Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Octavian Rasnita
A program in command line that works might be too long under Windows, but if it is necessary it could be made sending the list of files to the program with a pipe, like: dir /b | perl -e "print ;" This command prints the list of filenames on the console, and the dos command dir accepts wildca

RE: Having trouble porting an application to MS-Windows - corrected

2007-06-18 Thread Bob McConnell
> -Original Message- > From: Chas Owens [mailto:[EMAIL PROTECTED] > Sent: Friday, June 15, 2007 7:43 PM > To: Bob McConnell > Cc: beginners@perl.org > Subject: Re: Having trouble porting an application to MS-Windows > > On 6/15/07, Bob McConnell <[EMAIL PROTECTED]> wrote: > > > -Origi

Re: bug in perl or in my head ;-)

2007-06-18 Thread Tom Phoenix
On 6/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: I'm a bit confused. Both files should be utf8?? Probably. It's worth a bug report, at least. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] htt

RE: Having trouble porting an application to MS-Windows

2007-06-18 Thread Bob McConnell
> -Original Message- > From: Chas Owens [mailto:[EMAIL PROTECTED] > Sent: Friday, June 15, 2007 7:43 PM > To: Bob McConnell > Cc: beginners@perl.org > Subject: Re: Having trouble porting an application to MS-Windows > > On 6/15/07, Bob McConnell <[EMAIL PROTECTED]> wrote: > > > -Origi

Re: simple tcp socket server:Is it possible, server wait for '!' sign, not '\n'?

2007-06-18 Thread Max Rodkin
Thanks to all! Scrip did work fine. Here is: [EMAIL PROTECTED]:/home# cat gsserver.pl #!/usr/bin/perl -w use IO::Socket; use DBI; $dbname="xxx"; $user="xxx"; $pass="xxx"; $dbh = DBI->connect("DBI:mysql:database=$dbname;host=localhost;user=$user;password=$pass",{'RaiseError' => 1}); my $PORT = 50

Re: Command line usage

2007-06-18 Thread John Degen
-- Sane sicut lux seipsam, & tenebras manifestat, sic veritas norma sui, & falsi est. -- Spinoza > > >- Original Message >From: Paul Lalli <[EMAIL PROTECTED]> >To: beginners@perl.org >Sent: Monday, June 18, 2007 3:56:04 PM >Subject: Re: Command line usage > >On Jun 18, 8:40 am, [EMAIL P

Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Rob Dixon
John Degen wrote: I'm using Perl 5.8.8 from ActiveState on Windows XP. I'm trying to accomplish a search and replace in a number of files in the same directory from the command line (cmd.exe). The problem is that the command perl -i -e "s/old/new/" * fails silently, i.e. no changes take place. M

Re: Why must I chomp a variable set in a script?

2007-06-18 Thread Paul Lalli
On Jun 18, 8:48 am, [EMAIL PROTECTED] (Jefferson Kirkland) wrote: > my $emailBody = $prefix . "emailbody"; > The problem is when I get down to the part after the emailbody files are > populated ( they are only populated if files exist) that checks to see if > the files are of zero size. If t

Re: Command line usage

2007-06-18 Thread Paul Lalli
On Jun 18, 8:40 am, [EMAIL PROTECTED] (John Degen) wrote: > Thanks for your speedy reply Bob. I tried your suggestion, but the same > outcome: the command fails without any complaints. BTW, the files didn't have > extensions. They are three test files (plain text) containing respectively > "love

Why must I chomp a variable set in a script?

2007-06-18 Thread Jefferson Kirkland
Hello everyone! I would really appreciate it if someone could shed some light on this situation for me. I have a script that I am writing that looks on a server to see if there are files in certain directories. When files are found in a directory, the script sends an email to the appropriate di

bug in perl or in my head ;-)

2007-06-18 Thread Martin Barth
Hi there, have a look at: % cat datei eine test datei die "u "a "o % file datei datei: ASCII text % cp datei datei.bk % perl -wpi -e 'use encoding "utf8"; s/"a/ä/' datei % file datei datei: ISO-8859 text % perl -wp -e 'use encoding "utf8"; s/"a/ä/' datei.bk > datei.neu % file datei.neu datei.neu:

Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread John Degen
Thanks for your speedy reply Bob. I tried your suggestion, but the same outcome: the command fails without any complaints. BTW, the files didn't have extensions. They are three test files (plain text) containing respectively "love, live and luve". The actual command that I tried was perl -i -e

RE: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Bob McConnell
Windows uses file extensions for a variety of reasons, so it expects the period in file names. In most cases, the file spec "*" will only return files with no extension, such as "README". Have you tried "*.*" instead? Bob McConnell > -Original Message- > From: John Degen [mailto:[EMAIL PR

[Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread John Degen
Hello, I'm using Perl 5.8.8 from ActiveState on Windows XP. I'm trying to accomplish a search and replace in a number of files in the same directory from the command line (cmd.exe). The problem is that the command perl -i -e "s/old/new/" * fails silently, i.e. no changes take place. My question

php to perl translation

2007-06-18 Thread Andreas Moroder
Hello, after a long search I found a script that creates oracle password hashes. I need the result of this script to store the password in out LDAP database in the oracle hashed format. The problem is that it is a php script and I need it in perl. I am a perl beginner and I am not able to co