Re: read/write to command line opened as a file

2015-04-20 Thread Shlomi Fish
Hi all, On Mon, 20 Apr 2015 17:02:22 -0500 Andy Bach wrote: > On Mon, Apr 20, 2015 at 3:32 PM, Frank K. wrote: > > > Would someone suggest a solution which would allow me to “open” a > > read/write session to a command line?? > > > perlfaq8.pod >How can I

Re: read/write to command line opened as a file

2015-04-20 Thread Andy Bach
On Mon, Apr 20, 2015 at 3:32 PM, Frank K. wrote: > Would someone suggest a solution which would allow me to “open” a > read/write session to a command line?? perlfaq8.pod How can I open a pipe both to and from a command? The IPC::Open2 module (part of the standard perl distri

read/write to command line opened as a file

2015-04-20 Thread Frank K.
write several commands to the handle and read the output of each command.. Would someone suggest a solution which would allow me to "open" a read/write session to a command line?? Thanks in advance.. flk k

Windows Command-Line Arguments; Secrets or Stitching Them Together

2013-01-11 Thread Brandon McCaig
o such mechanism exists for cmd.exe that I am aware of. %* is substituted for the command line arguments, but they aren't quoted or escaped so they are not preserved. You could hard-code up to 9 arguments with "%1" "%2" ... "%n", but then you'll be passing always

Re: Regex behavior in command line

2012-06-07 Thread Jon Forsyth
I overlooked the missing single quotes, Thanks! -Jon

Re: Regex behavior in command line

2012-06-01 Thread Rob Dixon
e matches). Something like: perl -p -i.bak -e 's/PATTERN/REPLACE/g' INPUT Hi Jon Backslashes within a single-quoted command-line string don't need escaping, so a single backslash before each parenthesis is correct. But from your output it seems you have omitted the single-q

Re: Regex behavior in command line

2012-05-31 Thread Shawn H Corey
On 12-05-31 01:23 PM, Jon Forsyth wrote: Hello, I'm using the following line in Terminal, on OSX Lion, but I can't seem to match parentheses '()': perl -n -e 'print if(/\\(Submit\\)/)' visits/admin_add.ctp I tried with one backslash in front of each '(' ')' as well to no avail. If I remove t

Regex behavior in command line

2012-05-31 Thread Jon Forsyth
Hello, I'm using the following line in Terminal, on OSX Lion, but I can't seem to match parentheses '()': perl -n -e 'print if(/\\(Submit\\)/)' visits/admin_add.ctp I tried with one backslash in front of each '(' ')' as well to no avail. If I remove the '\'s and '()' the match is printed like s

Re: read from command line

2012-03-03 Thread lina
Thanks for both of you. Your guys are great. Best regards, -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: read from command line

2012-03-03 Thread Ken Slater
On Sat, Mar 3, 2012 at 9:08 AM, lina wrote: > $ perl extract.pl try.tex > Bareword "filename" not allowed while "strict subs" in use at extract.pl line > 8. > Execution of extract.pl aborted due to compilation errors. > > > #!/usr/bin/env perl > > use strict; > use warnings; > > my $filename = $A

Re: read from command line

2012-03-03 Thread Steve Bertrand
On 2012-03-03 09:08, lina wrote: $ perl extract.pl try.tex Bareword "filename" not allowed while "strict subs" in use at extract.pl line 8. Execution of extract.pl aborted due to compilation errors. #!/usr/bin/env perl use strict; use warnings; Good. my $filename = $ARGV[0] ; open FILE, "

read from command line

2012-03-03 Thread lina
$ perl extract.pl try.tex Bareword "filename" not allowed while "strict subs" in use at extract.pl line 8. Execution of extract.pl aborted due to compilation errors. #!/usr/bin/env perl use strict; use warnings; my $filename = $ARGV[0] ; open FILE, "<", filename or die $!; my @line = ; whil

Re: Command line perl to stat a file

2012-02-12 Thread Dr.Ruud
On 2012-02-11 20:33, Harry Putnam wrote: Kevin Spencer writes: On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: But these command line attempts fail: (all on one line) perl -e 'my ($seven, $nine) = (stat('./SweetwatterPk-016.jpg'))[7, 9]; print &q

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Kevin Spencer writes: > On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: >> >> But these command line attempts fail: >> >> (all on one line) >>  perl  -e 'my ($seven, $nine) = >>    (stat('./SweetwatterPk-016.jpg'))[7, 9]; >>    

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Rob Dixon writes: > Something like this perhaps? > > perl -e "print join ' and ', (stat shift)[7,9]" ./SweetwaterPk-016.jpg Nice... yes Thanks > But I would think the modification time (stat 9) wouldn't be of much > use without formatting it. In t

Re: Command line perl to stat a file

2012-02-10 Thread Kevin Spencer
On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: > > But these command line attempts fail: > > (all on one line) >  perl  -e 'my ($seven, $nine) = >    (stat('./SweetwatterPk-016.jpg'))[7, 9]; >        print "$seven and $nine"' &

Re: Command line perl to stat a file

2012-02-10 Thread Rob Dixon
On 10/02/2012 17:52, Harry Putnam wrote: This script: --- 8< snip -- 8< snip -- 8 Something like this perhaps? perl -e "print join ' and ', (stat shift)[7,9]" ./SweetwaterPk-016.jpg But I would think the modification time (stat 9) wouldn't be of much use without format

Command line perl to stat a file

2012-02-10 Thread Harry Putnam
This script: --- 8< snip -- 8< snip -- 8http://learn.perl.org/

Re: perl as command line

2011-05-27 Thread Ireneusz Pluta
W dniu 2011-05-24 06:11, vishesh kumar pisze: Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. generally, you might be interested in http://minimalperl.com/. HTH Irek -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: perl as command line

2011-05-26 Thread vishesh kumar
Thanks Jim Now i understood completely. Very good explanation. On Fri, May 27, 2011 at 10:45 AM, Jim Gibson wrote: > At 10:28 AM +0530 5/27/11, vishesh kumar wrote: > >> Hi Jim >> > > You should address all of your questions to the list as a whole. That way > you will get smarter people than

Re: perl as command line

2011-05-26 Thread Jim Gibson
At 10:28 AM +0530 5/27/11, vishesh kumar wrote: Hi Jim You should address all of your questions to the list as a whole. That way you will get smarter people than me helping you. echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' Giving desired result, but i wonder what is use of ? in this exp

Re: perl as command line

2011-05-26 Thread vishesh kumar
linux system admin. I want to use perl as a command line like sed >> and awk. >> For example suppose , i need to extract IP Addr from a string or file >> using >> regrex >> i mean >> str="hello ip is 192.168.2.1 and data is xxx" >> And i want ip

Re: perl as command line

2011-05-24 Thread vishesh kumar
Thanks Jim Your suggestion working great !!! On Tue, May 24, 2011 at 11:59 AM, Jim Gibson wrote: > echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' -- http://linuxmantra.com

Re: perl as command line

2011-05-24 Thread Shlomi Fish
Hi Vishesh, On Tuesday 24 May 2011 07:11:45 vishesh kumar wrote: > Hi Members, > > I am a linux system admin. I want to use perl as a command line like sed > and awk. > For example suppose , i need to extract IP Addr from a string or file using > regrex > i mean

Re: perl as command line

2011-05-23 Thread Jim Gibson
At 9:41 AM +0530 5/24/11, vishesh kumar wrote: Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And

perl as command line

2011-05-23 Thread vishesh kumar
Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And i want ip addr only using Regex echo $str

Re: Some explanation please -- iterating thru command line arguments

2010-07-23 Thread newbie01 perl
? > > > > mail_smtp.pl > > -r > > ${MAILFROM} > > -s > > "$subject_line TEST EMAIL" > > supportm...@test.com > > < > > /tmp/test_email.txt > > Just to clarify the end of the command line: > > mail_smtp.pl -r ${MAILFROM}

Re: Some explanation please -- iterating thru command line arguments

2010-07-22 Thread Brandon McCaig
On Wed, Jul 21, 2010 at 1:17 PM, newbie01 perl wrote: > Does $_ contains the following values on each iteration? > > mail_smtp.pl > -r > ${MAILFROM} > -s > "$subject_line TEST EMAIL" > supportm...@test.com > < > /tmp/test_email.txt Just to clarify th

Re: Some explanation please -- iterating thru command line arguments

2010-07-21 Thread John W. Krahn
"$subject_line TEST EMAIL" supportm...@test.com< /tmp/test_email.txt The Perl script is working and SMTP mail is working. Am just trying to understand how the getval sub-routine is parsing the command line arguments. the getval subroutin

Re: Some explanation please -- iterating thru command line arguments

2010-07-21 Thread Jim Gibson
led from a > UNIX Korn script as below: > > mail_smtp.pl -r ${MAILFROM} -s "$subject_line TEST EMAIL" > supportm...@test.com < /tmp/test_email.txt > > The Perl script is working and SMTP mail is working. Am just trying to > understand how the getval sub-routine is par

Some explanation please -- iterating thru command line arguments

2010-07-21 Thread newbie01 perl
EMAIL" supportm...@test.com < /tmp/test_email.txt The Perl script is working and SMTP mail is working. Am just trying to understand how the getval sub-routine is parsing the command line arguments. the getval subroutine is as below.

Re: passing command-line arg containing '@'

2009-12-10 Thread Alan Haggai Alavi
>I need to pass an command-line arg that is a string which contains the '@'. Is there any way to do this and also 'tell' Perl not to interpret this as other than a '@' character? > >Thx. Hi, Perl would not do anything with command-line arguments unle

Re: passing command-line arg containing '@'

2009-12-09 Thread Jim Gibson
On 12/9/09 Wed Dec 9, 2009 6:01 PM, "Tony Esposito" scribbled: > I need to pass an command-line arg that is a string which contains the '@'. > Is there any way to do this and also 'tell' Perl not to interpret this as > other than a '@' char

passing command-line arg containing '@'

2009-12-09 Thread Tony Esposito
I need to pass an command-line arg that is a string which contains the '@'. Is there any way to do this and also 'tell' Perl not to interpret this as other than a '@' character? Thx.

Re: __DATA__ in command line

2009-11-05 Thread 兰花仙子
OK thank you both, I got it. 2009/11/6 Shawn H Corey : > 兰花仙子 wrote: >> Hello, >> >> doesn't one-liner Perl command support __DATA__ handler? >> Just found this: >> >> # perl -e 'while(){ print } >>> __DATA__ >>> abc >>> 123 >>> def >>> ' >> >> run without any output. >> > > > $ perl -MO=Deparse -

Re: __DATA__ in command line

2009-11-05 Thread Shawn H Corey
兰花仙子 wrote: > Hello, > > doesn't one-liner Perl command support __DATA__ handler? > Just found this: > > # perl -e 'while(){ print } >> __DATA__ >> abc >> 123 >> def >> ' > > run without any output. > $ perl -MO=Deparse -e 'while(){ print } >> __DATA__ >> abc >> ' while (defined($_ = )) {

Re: __DATA__ in command line

2009-11-05 Thread John W. Krahn
À¼»¨ÏÉ×Ó wrote: Hello, Hello, doesn't one-liner Perl command support __DATA__ handler? No. It only works in an actual file located on a real file system. Just found this: # perl -e 'while(){ print } __DATA__ abc 123 def ' run without any output. You could always do it like this:

__DATA__ in command line

2009-11-05 Thread 兰花仙子
Hello, doesn't one-liner Perl command support __DATA__ handler? Just found this: # perl -e 'while(){ print } > __DATA__ > abc > 123 > def > ' run without any output. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Re: command line perldoc and Padre, the Perl IDE

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 13:54, Gabor Szabo wrote: snip > There is the new  perlopref  document by Chas. Owens who is also on > this list. That's great. Thanks Chas!  That will be able to explain > certain expressions such as &&. > > I am sure he will be happy to get some help from you. > See http:

command line perldoc and Padre, the Perl IDE

2009-09-10 Thread Gabor Szabo
e -v option: perldoc -v '$.' and I think on windows it needs to be perldoc -v "$." but of course most of the windows people will freak out if they need to use the command line and I don't blame them. I hate to use the Windows command shell as well. That's an

Re: Getting STDIN filename from command line

2009-05-21 Thread Chas. Owens
On Thu, May 21, 2009 at 12:44, Tony Esposito wrote: > Hello, > > Given the command line: > > perl myperl.plx < myfile.txt > > is there anyway from within the Perl script to capture the redirected STDIN > filename (i.e., myfile.txt)? > > OS:      WinXP SPSP3

Getting STDIN filename from command line

2009-05-21 Thread Tony Esposito
Hello, Given the command line: perl myperl.plx < myfile.txt is there anyway from within the Perl script to capture the redirected STDIN filename (i.e., myfile.txt)? OS:      WinXP SPSP3 Perl:     5.8.8 for Win32 from ActiveState Thx.

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Fri, Nov 28, 2008 at 22:21, John W. Krahn <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: >> >> On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: >> snip >>> >>> perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' >> >> snip >> >> Perl Golf time: >> >>

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread John W. Krahn
Chas. Owens wrote: On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: snip perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' snip Perl Golf time: perl -le'print map chr+(33..126)[rand 94],1..8' $ perl -le'print map chr+(33..126)[rand 94],1..8' Wa

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' snip Perl Golf time: perl -le'print map chr+(33..126)[rand 94],1..8' -- Chas. Owens wonkden.net The most important skill a programmer can have

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Thu, Nov 27, 2008 at 15:04, Yimin Rong <[EMAIL PROTECTED]> wrote: > wget -q -O - "http://random.org/integers/? > num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne > 'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"' > > wget reads web pages > random.org generates rand

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread John W. Krahn
Yimin Rong wrote: wget -q -O - "http://random.org/integers/? num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne 'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"' You can simplify the perl part to: perl -lane'print map chr hex, @F' Or just using perl: perl -MLWP::

One liner to generate truly random passwords from command line

2008-11-28 Thread Yimin Rong
wget -q -O - "http://random.org/integers/? num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne 'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"' wget reads web pages random.org generates random numbers using atmospheric noise perl splits the input into tokens and convert

Re: Unix command-line tools to edit SharePoint site?

2008-07-11 Thread ericjhahn
And here is the createEnvelope function: # # Functions listed below are internal to the creation of the custom SOAP requests. # sub createEnvelope { my $action = shift; my $namesp = shift; my $params = shift; my $soap = ' http://www.w3.org/2001/ XMLSchema-instance"

Re: Unix command-line tools to edit SharePoint site?

2008-06-13 Thread Rob Dixon
Jack Trinh (jtrinh) wrote: > > SE CORRECT THEM FOR ME. > Thanks > JACK Hush -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Unix command-line tools to edit SharePoint site?

2008-06-13 Thread Jack Trinh (jtrinh)
SE CORRECT THEM FOR ME. Thanks JACK -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 05:15 PM Pacific Standard Time To: beginners@perl.org Subject:Re: Unix command-line tools to edit SharePoint site? Kelley, I just

Re: Unix command-line tools to edit SharePoint site?

2008-06-13 Thread ericjhahn
Kelley, I just completed a project had to figure out how to create SharePoint calendar events from Perl. This was quite a chore, as MS's SOAP interface does not adhere to open standards. As such, I had to create my own custom SOAP requests that contained MS's CAML query language. See the example

Unix command-line tools to edit SharePoint site?

2008-05-24 Thread Kelly Jones
I begrudgingly use a Windows SharePoint server at a customer's request. I'd like to automate (command-line) updating and creating documents, lists, etc. Is there a Unix tool that does this? I know SharePoint has an "API", which basically spoofs the GET/POST calls that you

Re: How to command line perl mail client for Microsoft exhange?

2008-04-23 Thread Chas. Owens
On Thu, Apr 24, 2008 at 12:07 AM, Siegfried Heintze (Aditi) <[EMAIL PROTECTED]> wrote: > I started installing Mail::Sender, Mail::Send and Mail::Util and discovered > it is prompting me for a default SMTP server as part of the installation > server. Well I go to outlook and view my account settin

How to command line perl mail client for Microsoft exhange?

2008-04-23 Thread Siegfried Heintze (Aditi)
I started installing Mail::Sender, Mail::Send and Mail::Util and discovered it is prompting me for a default SMTP server as part of the installation server. Well I go to outlook and view my account settings and discover that I'm connect to an exchange server. Is that what I specify for my SMTP s

Re: Using perl variable in command line

2008-02-21 Thread yitzle
On Thu, Feb 21, 2008 at 10:35 AM, Yoyoyo Yoyoyoyo <[EMAIL PROTECTED]> wrote: > But the commands do still run in the command line, is there anyway to throw > a perl variable in there? Yes. You did it correctly. Look at the code I posted. > my $y = `echo $x`; -- To unsubscribe,

Re: Using perl variable in command line

2008-02-21 Thread Yoyoyo Yoyoyoyo
But the commands do still run in the command line, is there anyway to throw a perl variable in there? yitzle <[EMAIL PROTECTED]> wrote: Perl captures the output from backticks so nothing gets printed to the screen. __CODE__ my $x = "efg"; my $y = `echo $x`; print $y; __OUTP

Re: Using perl variable in command line

2008-02-21 Thread yitzle
Perl captures the output from backticks so nothing gets printed to the screen. __CODE__ my $x = "efg"; my $y = `echo $x`; print $y; __OUTPUT__ efg __END__ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Using perl variable in command line

2008-02-21 Thread Yoyoyo Yoyoyoyo
Hi all, I am having trouble representing a perl variable when using back ticks to run commands from the unix command line. A simple example would be: #!usr/bin/perl $X = $ARGV[0]; `echo $X`; This does not work (neither does `echo \$X`;). Is there anyway to represent a perl variable when

Re: order of command line switch?

2008-02-13 Thread Chas. Owens
On Feb 13, 2008 2:57 PM, ciwei <[EMAIL PROTECTED]> wrote: snip > so why the order of -n -e switch make the differience? > this is perl 5.8.4. > Thanks snip This is true in all versions of Perl. It is becuase you are allowed to have more than one -e option: perl -e 'print "read ";' -e 'print "th

Re: order of command line switch?

2008-02-13 Thread Kashif Salman
On Feb 13, 2008 11:57 AM, ciwei <[EMAIL PROTECTED]> wrote: > hostA>ls > SUNWjassVRTSVRTSicsco VRTSvcs > emc SUNWmlibVRTSalloc VRTSjre VRTSvlicVRTSvxvm > > hostA>ls | perl -en 'print if /SUNW/' > > return nothing , while > > hostA>ls | perl -ne 'print if /SUNW/'

order of command line switch?

2008-02-13 Thread ciwei
hostA>ls SUNWjassVRTSVRTSicsco VRTSvcs emc SUNWmlibVRTSalloc VRTSjre VRTSvlicVRTSvxvm hostA>ls | perl -en 'print if /SUNW/' return nothing , while hostA>ls | perl -ne 'print if /SUNW/' SUNWits SUNWjass SUNWmlib SUNWrtvc so why the order of -n -e switch mak

Re: Command line installing perl modules

2008-01-31 Thread Bobby
On Thursday 31 January 2008 20:40:13 Chas. Owens wrote: > > How do I automate the install of a bunch of modules. Is it enough to just > > install the tarballs, or will there be dependencies that I have to trace > > down first? If so what is the best way to do that? > You automate it by using the

Re: Command line installing perl modules

2008-01-31 Thread Chas. Owens
On Jan 31, 2008 8:32 PM, Bobby <[EMAIL PROTECTED]> wrote: snip > Yes, thank you, but that part is old hat. What I'm looking for is if anything > is different when I simply install the tarballs? snip You have to do everything yourself. snip > How do I automate the install of a bunch of modules. Is

Re: Command line installing perl modules

2008-01-31 Thread Bobby
On Thursday 31 January 2008 20:15:22 Chas. Owens wrote: > On Jan 31, 2008 7:44 PM, Bobby <[EMAIL PROTECTED]> wrote: > > On Thursday 31 January 2008 17:45:53 Chas. Owens wrote: > > > On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: > > > snip > > > > > > > This will be done only on brand ne

Re: Command line installing perl modules

2008-01-31 Thread Chas. Owens
On Jan 31, 2008 7:44 PM, Bobby <[EMAIL PROTECTED]> wrote: > On Thursday 31 January 2008 17:45:53 Chas. Owens wrote: > > On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: > > snip > > > > > This will be done only on brand new Slackware 12 installs which does not > > > have CPAN. > > > > snip

Re: Command line installing perl modules

2008-01-31 Thread Bobby
On Thursday 31 January 2008 17:45:53 Chas. Owens wrote: > On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: > snip > > > This will be done only on brand new Slackware 12 installs which does not > > have CPAN. > > snip > > That doesn't sound right. Are you certain you have Perl installed? >

Re: Command line installing perl modules

2008-01-31 Thread Chas. Owens
On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: snip > This will be done only on brand new Slackware 12 installs which does not have > CPAN. snip That doesn't sound right. Are you certain you have Perl installed? CPAN is part of Core Perl and should be there if Perl is installed. Try p

Command line installing perl modules

2008-01-31 Thread Bobby
Hi, I'm trying to figure out how to install perl modules from command line (to automate the install process). CPAN allowed me to d/l direct which results in tarballs. Are there any caveats to watch out for when installing them this way? This will be done only on brand new Slackwa

Re: cpan command line

2007-09-28 Thread Paul Lalli
On Sep 28, 12:32 pm, [EMAIL PROTECTED] (Bobby) wrote: > On Friday 28 September 2007 12:26:08 Paul Lalli wrote: > > > [EMAIL PROTECTED] (Bobby) wrote: > > > > > What is the command to tell cpan to accept the default/suggested > > > > > values? > > When you run the cpan set up command, it will ask yo

Re: cpan command line

2007-09-28 Thread Bobby
> > > > Hi, > > > > > > > > What is the command to tell cpan to accept the default/suggested > > > > values? > > > > No. Command line option so you don't have to be there and press Enter. > > When you run the cpan set up command,

Re: cpan command line

2007-09-28 Thread Paul Lalli
On Sep 28, 9:26 am, [EMAIL PROTECTED] (Bobby) wrote: > On Friday 28 September 2007 06:01:31 Srinivas wrote: > > > just hit "Enter" > > > -srini > > > Bobby wrote: > > > Hi, > > > > What is the command to tell cpan to accept the defau

Re: cpan command line

2007-09-28 Thread Bobby
On Friday 28 September 2007 06:01:31 Srinivas wrote: > just hit "Enter" > > -srini > > Bobby wrote: > > Hi, > > > > What is the command to tell cpan to accept the default/suggested values? No. Command line option so you don't have to be there and

Re: cpan command line

2007-09-28 Thread Srinivas
just hit "Enter" -srini Bobby wrote: Hi, What is the command to tell cpan to accept the default/suggested values? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

cpan command line

2007-09-27 Thread Bobby
Hi, What is the command to tell cpan to accept the default/suggested values? -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: running cgi off the command line works, but running on the browser fails with a 500 error

2007-09-27 Thread Paul Lalli
; 5 adding the bits from teat.pl > 6 use warnings; > 7 use LWP::Simple; > > Line 25 -- shown below, is just a simple getstore, this works when run from > the command line, but when run form the webserver, I get above error > message, I've tried the usual 500 error mes

Re: running cgi off the command line works, but running on the browser fails with a 500 error

2007-09-27 Thread Tom Phoenix
On 9/27/07, Pat Rice <[EMAIL PROTECTED]> wrote: > Line 25 -- shown below, is just a simple getstore, this works when run from > the command line, but when run form the webserver, I get above error > message, I've tried the usual 500 error messages, just wondering if anyone &g

running cgi off the command line works, but running on the browser fails with a 500 error

2007-09-27 Thread Pat Rice
works when run from the command line, but when run form the webserver, I get above error message, I've tried the usual 500 error messages, just wondering if anyone has any ideas ??? 21 my $url = "http://private.private.com/pending/$variable_name";; 22 #print "\n This is t

Re: Command line usage [solved]

2007-06-22 Thread Brad Baxter
On Jun 18, 5:54 pm, [EMAIL PROTECTED] (John Degen) wrote: > >- Original Message > >From: Paul Lalli <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Sent: Monday, June 18, 2007 6:47:05 PM > >Subject: Re: Command line usage > > >On Jun 18, 1

Re: Command line usage

2007-06-19 Thread Fetter
##I have files read into $output_dir if ($output_dir =~ "_Modified") { $allfile2 = $output_dir; #set allfile2 equal to output_dir to keep output_dir untouched $_ = $allfile2; #set input string equal to allfile2 for replacement s/_Mo

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: 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

Re: Command line usage

2007-06-18 Thread Paul Lalli
he other is *.*. Funny though that > sed *does* work. Ah. Well there's your problem. The command line interpreter you're running doesn't expand wildcards. That's why Perl wasn't giving you any errors - it had nothing to do because there was no file named "*" tha

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

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 d

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

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. n

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

Re: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread John Degen
was perl -i -e "s/ve/ver/" *.* Any other ideas I might try? Regards, John - Original Message From: Bob McConnell <[EMAIL PROTECTED]> To: John Degen <[EMAIL PROTECTED]>; beginners@perl.org Sent: Monday, June 18, 2007 2:31:00 PM Subject: RE: [Perl 5.8.8 on WinXP]

RE: [Perl 5.8.8 on WinXP] Command line usage

2007-06-18 Thread Bob McConnell
> From: John Degen [mailto:[EMAIL PROTECTED] > Sent: Monday, June 18, 2007 8:26 AM > To: beginners@perl.org > Subject: [Perl 5.8.8 on WinXP] Command line usage > > Hello, > > I'm using Perl 5.8.8 from ActiveState on Windows XP. I'm > trying to accomplish a sea

[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 ch

Re: Detecting whether a script was called via CGI or the command line

2007-05-04 Thread Xavier Noria
On May 4, 2007, at 2:44 PM, Nigel Peck wrote: Within the script I want to know where it was executed from; CGI or command line/cron job. I'm currently checking @ARGV to do this i.e. if there is data in @ARGV then it was called from the command line, but obviously this means there mu

Detecting whether a script was called via CGI or the command line

2007-05-04 Thread Nigel Peck
Hi, I have a script which is usually run through CGI, but I want to set it up to be executed by a cron job each day too. Within the script I want to know where it was executed from; CGI or command line/cron job. I'm currently checking @ARGV to do this i.e. if there is data in @ARGV th

Re: Win32 script cannot read command line argument.

2007-05-02 Thread Vladimir Lemberg
>; Sent: Wednesday, May 02, 2007 2:11 PM Subject: RE: Win32 script cannot read command line argument. -Original Message- From: Vladimir Lemberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 02, 2007 14:01 To: beginners@perl.org Subject: Win32 script cannot read command line argu

RE: Win32 script cannot read command line argument.

2007-05-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Vladimir Lemberg [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 02, 2007 14:01 > To: beginners@perl.org > Subject: Win32 script cannot read command line argument. > > Hi All, > > My script is unable to read argument when I'

Win32 script cannot read command line argument.

2007-05-02 Thread Vladimir Lemberg
Hi All, My script is unable to read argument when I'm executing it as: script.pl . However, when I'm running it as: perl script.pl - it works fine. I did associate perl scripts with Perl as explained in ActivePerl-Winfaq4.htm All my scripts, which doesnt require any arguments works file. I

Re: Command line fed to Perl was Re: File::Find again

2007-03-26 Thread Jenda Krynicky
From: Alan <[EMAIL PROTECTED]> > It's a different case here ie not a var, instead it's a command line that's > entered into a shell, such command line being passed to Perl. And the > command needs to make it to Perl without getting altered befo

Command line fed to Perl was Re: File::Find again

2007-03-26 Thread Alan
efore . . . so if I pass it > > > > > > -s "\.properties$" > > > > > > at the command line, it works as expetcted. Nice. > > > > That might be a shell thing? > > > > In Linux bash shell those quotes (I think) tell the shell to not > &g

Re: Multiple character command line switch

2007-03-12 Thread yitzle
You can access the command line parameters directly without any module with @ARGV. Not sure if this helps. myScript -f1 -f2 Something like this might work: for ( $i = 0; $i < [EMAIL PROTECTED] - 1; $i += 2 ) { hash{"AGV[$i]"} = AGV[$i + 1]; } print "FIle 1: $hash{&

Re: Multiple character command line switch

2007-03-12 Thread Jeff Pang
> >Hi all, > >I was trying to write a script. I wanted to use multiple characters in >command line switches. >For example >myScript -f1 -f2 > >now getopt or getopts allows only for single character switches (please >correct me if its not true). >Is there any m

  1   2   3   4   5   6   >