RE: how to print certain field out

2012-06-08 Thread Wagner, David --- Sr Programmer Analyst --- CFS
>-Original Message- >From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] >Sent: Friday, June 08, 2012 14:58 >To: lina >Cc: beginners@perl.org >Subject: Re: how to print certain field out > >On Fri, Jun 8, 2012 at 11:44 AM, lina wrote: >> On Sat, Jun 9,

Re: how to print certain field out

2012-06-08 Thread Chris Stinemetz
On Fri, Jun 8, 2012 at 11:44 AM, lina wrote: > On Sat, Jun 9, 2012 at 12:16 AM, lina wrote: >> Hi, >> >> Here is the to-be-processed file, >> >> $ more try >>  #  RESIDUE AA STRUCTURE BP1 BP2  ACC     N-H-->O    O-->H-N >> N-H-->O    O-->H-N    TCO  KAPPA ALPHA  PHI   PSI    X-CA   Y-CA >> Z-CA >

Re: how to print certain field out

2012-06-08 Thread Jim Gibson
On Jun 8, 2012, at 9:16 AM, lina wrote: > Hi, > > Here is the to-be-processed file, > > $ more try > # RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->OO-->H-N > N-H-->OO-->H-NTCO KAPPA ALPHA PHI PSIX-CA Y-CA > Z-CA >1 174 V 0 00 0, 0.0 2,-

Re: how to print certain field out

2012-06-08 Thread Rob Dixon
On 08/06/2012 17:16, lina wrote: Hi, Here is the to-be-processed file, $ more try # RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->OO-->H-N N-H-->OO-->H-NTCO KAPPA ALPHA PHI PSIX-CA Y-CA Z-CA 1 174 V 0 00 0, 0.0 2,-0.3 0, 0.0 0,

Re: how to print certain field out

2012-06-08 Thread lina
On Sat, Jun 9, 2012 at 12:16 AM, lina wrote: > Hi, > > Here is the to-be-processed file, > > $ more try >  #  RESIDUE AA STRUCTURE BP1 BP2  ACC     N-H-->O    O-->H-N > N-H-->O    O-->H-N    TCO  KAPPA ALPHA  PHI   PSI    X-CA   Y-CA > Z-CA >    1  174   V              0   0    0      0, 0.0     2

Re: How to print HTML documents from perl script?

2010-02-25 Thread Rene Schickbauer
Hi! That will work for a small number of files. If you want to automate the process, then you need to either convert the HTML to a printer-ready file, or automate sending the file to a browser. A very crude (but quite effective) way is to use the X11::GUITest or Win32::GuiTest module. You w

Re: How to print HTML documents from perl script?

2010-02-25 Thread Dr.Ruud
boll wrote: Is there a module that will create printable HTML, Look into WebKit. (and Titanium, while you are at it) -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How to print HTML documents from perl script?

2010-02-24 Thread boll
Jim Gibson wrote: On 2/24/10 Wed Feb 24, 2010 11:49 AM, "boll" scribbled: Hello- I am hoping there is a way to print HTML documents from a perl script. #!/usr/bin/perl -w use strict; use warnings; print "Content-Type: text/html\n\n"; open HTML, "table_one.html" or

Re: How to print HTML documents from perl script?

2010-02-24 Thread Jim Gibson
On 2/24/10 Wed Feb 24, 2010 11:49 AM, "boll" scribbled: > Hello- > > I am hoping there is a way to print HTML documents from a perl script. > > #!/usr/bin/perl -w > use strict; > use warnings; > print "Content-Type: text/html\n\n"; > open HTML, "table_one.html" or die $!;

Re: How to print HTML documents from perl script?

2010-02-24 Thread Shawn H Corey
boll wrote: > This displays the HTML code in the terminal window, but I need to > produce the rendered page on a printer. > Is there a module that will create printable HTML, > or maybe a system or exec command that will print the documents? > > These are plain HTML tables, so I don't need beautif

Re: How to print errors to both STDERR & a file?

2009-06-25 Thread rkb
pa...@compugenic.com wrote: > On Wed, Jun 24, 2009 at 09:41:10PM +0400, Roman Makurin wrote: >> On Wed, Jun 24, 2009 at 09:25:05AM -0700, pa...@compugenic.com wrote: >> > I'd like to automatically have my script's errors and warnings sent to >> > both STDOUT (console) and a log file. What is the p

Re: How to print errors to both STDERR & a file?

2009-06-24 Thread Raymond Wan
Hi Pablo, pa...@compugenic.com wrote: STDERR is where errors go. Error messages are generated as a result of an error, not a 'print' statement. Athough I could manually print to STDERR, I'm trying to log all errors to both a logfile and STDERR. Hm, not quite sure what you mean. Error

Re: How to print errors to both STDERR & a file?

2009-06-24 Thread pablo
On Wed, Jun 24, 2009 at 09:41:10PM +0400, Roman Makurin wrote: > On Wed, Jun 24, 2009 at 09:25:05AM -0700, pa...@compugenic.com wrote: > > I'd like to automatically have my script's errors and warnings sent to > > both STDOUT (console) and a log file. What is the proper way of doing this? > > pri

Re: How to print errors to both STDERR & a file?

2009-06-24 Thread Roman Makurin
On Wed, Jun 24, 2009 at 09:25:05AM -0700, pa...@compugenic.com wrote: > I'd like to automatically have my script's errors and warnings sent to > both STDOUT (console) and a log file. What is the proper way of doing this? print STDERR mess; print FILEHANDLE mess; > > Pablo > > -- > To unsubsc

Re: how to print % when using printf

2009-02-07 Thread Dr.Ruud
itshardtogetone wrote: > How do I print the % sign when using printf. RTFM. See for example: perldoc -f printf, which should point you to the sprintf doc. It is even the first mentioned conversion there. The doc is on a thingy called "the web" too: http://perldoc.perl.org/functions/sprintf.html

Re: how to print % when using printf

2009-02-06 Thread Jeff Peng
2009/2/7 itshardtogetone : > Hi, > How do I print the % sign when using printf. use another % to escape it. -- Jeff Peng Office: +86-20-38350822 AIM: jeffpang www.dtonenetworks.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.

Re: how to print dual key hash..

2007-10-27 Thread Jenda Krynicky
From: mAyur <[EMAIL PROTECTED]> > By the way, newBee, I have doubt abt ur code is it working? I am just > printing ur code again, with line numbers Are you trying to be kewl or just can't spell? "abt"? "ur"? > 1: foreach $document(@documents){ > 2: $valueOfTermD = 0; > 3: $powerO

Re: how to print dual key hash..

2007-10-27 Thread mAyur
On Oct 26, 6:07 am, [EMAIL PROTECTED] (newBee) wrote: > I have the fallowing code segment in my code. I want to print my > > foreach $document(@documents){ > $valueOfTermD = 0; > $powerOfTermD = 0; > foreach $term(keys %termWeightHash){ > if($termWeightHash{$

Re: how to print dual key hash..

2007-10-26 Thread Jeff Pang
On 10/26/07, newBee <[EMAIL PROTECTED]> wrote: > I have the fallowing code segment in my code. I want to print my > %termWeightHash to see if i have correct data at the end of the this > computation. Since this hash has two keys(I guess way to think that is > hash within) I am not sure how to print

Re: how to print "\n" in the output file

2006-11-05 Thread Mihir Kamdar
thanks all, the different ways suggested by you gave me a lot of learning. regards, Mihir On 11/5/06, Robin Norwood <[EMAIL PROTECTED]> wrote: "Mihir Kamdar" <[EMAIL PROTECTED]> writes: > 1. (*) text/plain > > hi, > > I am a beginner in Perl. I am trying to automatically generate a perl tes

Re: how to print "\n" in the output file

2006-11-05 Thread Robin Norwood
"Mihir Kamdar" <[EMAIL PROTECTED]> writes: > 1. (*) text/plain > > hi, > > I am a beginner in Perl. I am trying to automatically generate a perl test > case file which, on executing, would return HTTP response code and response > time,etc. In the output file that I am getting I want the

Re: how to print "\n" in the output file

2006-11-05 Thread Dr.Ruud
"Dr.Ruud" schreef: > Or set a variable like $LF to '\n'. > > my $LF = q{\n} ; > print $script "print q{${^O}${LF}};\n" ; Oops, make that last line: print $script "print qq{$^O$LF};\n" ; or, if you need the late OS-name: print $script "print qq{\${^O}${LF}};\n" ; -- Affijn, Ruud "

Re: how to print "\n" in the output file

2006-11-05 Thread Dr.Ruud
"Mihir Kamdar" schreef: > print OUTPUTSCRIPT "print qq|\\n|; "; Alternative: print OUTPUTSCRIPT 'print q{\n}; ' ; Why do you print a space at the end of the line? If you need interpolation, use the "" (or qq). print $script "print q{$^O\\n};\n" ; Or set a variable like $LF to '\n'.

Re: how to print "\n" in the output file

2006-11-05 Thread Rob Dixon
Mihir Kamdar wrote: hi, I am a beginner in Perl. I am trying to automatically generate a perl test case file which, on executing, would return HTTP response code and response time,etc. In the output file that I am getting I want the following line: print "\n" ; Any Suggestions?? print 'print

Re: how to print "\n" in the output file

2006-11-04 Thread Mihir Kamdar
thanks to all, i was able to solve the problem with your guidance. The code below worked for me: print OUTPUTSCRIPT "print qq|\\n|; "; Now I want to calculate the response time that web server took for a particular request(GET/POST). My output script is something like the following: my $req20

Re: how to print "\n" in the output file

2006-11-04 Thread Ron Smith
--- Mazhar <[EMAIL PROTECTED]> wrote: > On 11/4/06, Mihir Kamdar <[EMAIL PROTECTED]> > wrote: > > > > hi, > > > > I am a beginner in Perl. I am trying to > automatically generate a perl test > > case file which, on executing, would return HTTP > response code and > > response > > time,etc. In the

Re: how to print "\n" in the output file

2006-11-04 Thread Mazhar
On 11/4/06, Mihir Kamdar <[EMAIL PROTECTED]> wrote: hi, I am a beginner in Perl. I am trying to automatically generate a perl test case file which, on executing, would return HTTP response code and response time,etc. In the output file that I am getting I want the following line: print "\n" ;

Re: how to print " time " ???

2005-11-08 Thread John W. Krahn
heena s wrote: > i need to timestamp the datas. > i am usingperl in windows machine. > > tell me how print the time in file. Do you want just the time or the complete date? my $today = localtime; print "$today\n"; Or if you need better formatting: use POSIX 'strftime'; my $today = strftime

RE: how to print " time " ???

2005-11-08 Thread Ward.P.Fontenot
An example use POSIX qw(strftime); $date = strftime "%Y.%m.%d.%H.%M.%S", localtime; print "$date \n"; Prints "2005.11.08.14.00.00" (Year, month, day, hour, minute, second) -Original Message- From: heena s [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 12:44 PM To: begineers

Re: how to print " time " ???

2005-11-08 Thread Kenneth Wolcott
Hi; I quote from http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl "The Windows AS Package provides NO uninstall functionality, and is recommended only if you are unable to install ActivePerl using the MSI installer". So, unless you don't want to use the newer standard ins

RE: how to print " time " ???

2005-11-08 Thread Timothy Johnson
ubject: Re: how to print " time " ??? i am with windows 2000advance server.. and now iam downloading the "Activeperl" what is the difference b\w AS package and MSI ??>

Re: how to print " time " ???

2005-11-08 Thread heena s
i am with windows 2000advance server.. and now iam downloading the "Activeperl" what is the difference b\w AS package and MSI ??> Kenneth Wolcott <[EMAIL PROTECTED]> wrote: It works on my machine (Windows XP, SP2)... I wonder why perldoc works on my installation of Activestate perl when it do

Re: how to print " time " ???

2005-11-08 Thread Kenneth Wolcott
It works on my machine (Windows XP, SP2)... I wonder why perldoc works on my installation of Activestate perl when it doesn't on yours... C:\ perl -version This is perl, v5.8.7 built for MSWin32-x86-multi-thread (with 7 registered patches, see perl -V for more detail) Copyright 1987-2005, Larry

RE: how to print " time " ???

2005-11-08 Thread Timothy Johnson
[mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 11:57 AM To: Timothy Johnson Subject: RE: how to print " time " ??? perldoc not working... copy n pasted the cmd prompt C:\>perl -version This is perl, v5.6.1 built for MSWin32-x86-multi-thread Copyright 198

RE: how to print " time " ???

2005-11-08 Thread heena s
perldoc not working... copy n pasted the cmd prompt C:\>perl -version This is perl, v5.6.1 built for MSWin32-x86-multi-thread Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the

RE: how to print " time " ???

2005-11-08 Thread Timothy Johnson
Check out the documentation for time() and localtime() perldoc -f time perldoc -f localtime -Original Message- From: heena s [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 11:44 AM To: begineers perl Subject: how to print " time " ??? i need to timestamp the datas. i am usi

Re: how to print pdf files to particular printer like LASER in windows

2004-08-24 Thread Jenda Krynicky
From: "R.MURUGAVEL" <[EMAIL PROTECTED]> > I am new to this group, I have one problem that is how > to print pdf files to the particular printer installed > our system/network systems. > > If any one helps me a very great help for me urgent > Pl? This print the file on command line: print

Re: how to print pdf files to particular printer like LASER in windows

2004-08-24 Thread Chris Devers
On Tue, 24 Aug 2004, R.MURUGAVEL wrote: Good morning All! I am new to this group, I have one problem that is how to print pdf files to the particular printer installed our system/network systems. If any one helps me a very great help for me urgent Pl? Does this have something to do with Perl progra

RE: How to print like HEX string

2004-03-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
NetSnake wrote: > Hi,all: > I use Perl SNMP module to get server information, but I can not > print ethernet MAC address. > When I use snmpwalk or snmpget program, I get like this: > ifPhysAddress.2 = STRING: 0:e0:ac:b0:c2:1 . > But in Perl, I can not print this string, in consol, p

RE: how to print modification date

2003-12-16 Thread Bob Showalter
Stephan Hochhaus wrote: > Hello list, > > I tried to dig my way through my newly acquired Perl ina nutshell and > Learning Perl, but I couldn't find a satisfying solution to my > problem: > > How can I print the last modification date of a file? It should work > on different systems (*nix and OS

Re: How to print "..." during download

2003-12-10 Thread James Edward Gray II
On Dec 10, 2003, at 8:25 AM, usef wrote: Thank you guys for quick answers, What if I want to print a "..." and calculate the percentage and amount of currently downloaded size during the download process? (wget style), should I create another process to do that? or is there any other alternati

Re: How to print "..." during download

2003-12-10 Thread Morbus Iff
>What if I want to print a "..." and calculate the percentage and amount of >currently downloaded size during the download process? (wget style), should >I create another process to do that? or is there any other alternative? (I >will choose the later). I chatted about this in my book, SPIDERING HA

Re: How to print a string that uses variables and operators

2003-06-05 Thread deborah
Thank you! The separating comma was what I was leaving out. Also, I wanted to actually print the variable name, so I escaped the $ symbol. Deb On Wednesday, June 4, 2003, at 12:00 PM, James Edward Gray II wrote: On Wednesday, June 4, 2003, at 11:47 AM, deborah wrote: Example: I want to print

Re: How to print HTML immediately, and more than once?

2003-06-01 Thread Martin Lomas
[multi-posted to beginners & beginners-cgi] Hi, Re: my query - >I'm writing a simple file-upload Perl script. I have all the form and file handling >stuff done. >I want the script to write an HTML message to the user's browser before the upload >begins, you know, like "Upload in progress". Then

Re: How to print HTML immediately, and more than once?

2003-06-01 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Randal L. Schwartz) writes: >No, please read the original question a bit more carefully. Martin >wants some sort of activity to occur as a result of the beginning and >ending of a POST containing a file-upload. Since the browser starts >the POST

Re: How to print HTML immediately, and more than once?

2003-06-01 Thread WC -Sx- Jones
PMFJI: Martin> I'm writing a simple file upload script. I have all the form Martin> and file handling stuff done. I want the script to write an Martin> HTML message to the user browser before the upload begins, you Martin> know, like "Upload in progress". Then when the upload Martin> completes, I

Re: How to print HTML immediately, and more than once?

2003-06-01 Thread Randal L. Schwartz
> "Peter" == Peter Scott <[EMAIL PROTECTED]> writes: Peter> In article <[EMAIL PROTECTED]>, Peter> [EMAIL PROTECTED] (Randal L. Schwartz) writes: >>> "Martin" == Martin Lomas <[EMAIL PROTECTED]> writes: Martin> I'm writing a simple file upload script. I have all the form Martin> and file

Re: How to print HTML immediately, and more than once?

2003-06-01 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Randal L. Schwartz) writes: >> "Martin" == Martin Lomas <[EMAIL PROTECTED]> writes: >Martin> I'm writing a simple file upload script. I have all the form >Martin> and file handling stuff done. I want the script to write an >Martin> HTML messag

Re: How to print HTML immediately, and more than once?

2003-05-31 Thread Randal L. Schwartz
> "Martin" == Martin Lomas <[EMAIL PROTECTED]> writes: Martin> Hello All, Martin> I'm so glad to have found this list! I've searched all over about the following with no luck: Maybe if you were even luckier, you would have found the perl-beginners-cgi list instead. Martin> I'm writing a sim

RE: how to print array element & count

2003-01-21 Thread Bob Showalter
R. Joseph Newton wrote: > "... > foreach(1..$total_elements){ > print "\t\[$_\] my $input[$_ - 1 ]\n"; > } > ...Why did scalar $input in the foreach loop > "works" without predeclaring it with my?" --Eri > > HI Eri, > > The my is probably not doing what you think it is. Otherwise > it would

Re: how to print array element & count

2003-01-21 Thread R. Joseph Newton
"... foreach(1..$total_elements){ print "\t\[$_\] my $input[$_ - 1 ]\n"; } ...Why did scalar $input in the foreach loop "works" without predeclaring it with my?" --Eri HI Eri, The my is probably not doing what you think it is. Otherwise it would constitute a redeclaration error. My guess

Re: how to print array element & count

2003-01-21 Thread John W. Krahn
Eri Mendz wrote: > > Dear All, > > I'm greatly overwhelmed by your quick help to my problem. > Here's the corrected code: > > #!/usr/bin/perl -w > use strict; > > # filename: reverse_string.pl > # editor: # VIM - Vi IMproved 6.1 > # description: get user input and reverse input > > print "Plea

Re: how to print array element & count

2003-01-21 Thread Rob Dixon
"Eri Mendz" <[EMAIL PROTECTED]> wrote in message 3E2D45F0.14555.14A0579@localhost">news:3E2D45F0.14555.14A0579@localhost... > chomp(my @input = ); > my $total_elements = scalar(@input); Assigning to a scalar variable puts the right-hand-side in scalar context anyway. my $total_elements = @in

RE: how to print array element & count

2003-01-21 Thread Eri Mendz
Dear All, I'm greatly overwhelmed by your quick help to my problem. Here's the corrected code: #!/usr/bin/perl -w use strict; # filename: reverse_string.pl # editor: # VIM - Vi IMproved 6.1 # description: get user input and reverse input print "Please enter any string, to quit press Ctrl-Z:\

RE: how to print array element & count

2003-01-20 Thread Bob Showalter
Eri Mendez wrote: > hi all, > > another newbie here. im having problem how to print to stdout the > string[s] entered by user and appending a subscript integer after that > string. this is my modification to exercise 1 chapter 3 of Llama book: > > #!/usr/bin/perl -w > use strict; > > # filename:

Re: how to print array element & count

2003-01-20 Thread John W. Krahn
Eri Mendez wrote: > > hi all, Hello, > another newbie here. im having problem how to print to stdout the > string[s] entered by user and appending a subscript integer after that > string. this is my modification to exercise 1 chapter 3 of Llama book: > > #!/usr/bin/perl -w > use strict; > > #

Re: how to print array element & count

2003-01-20 Thread R. Joseph Newton
"print "\t\[", $_, "\] $_\n";" Hi Eri, I would suggest dispensing with the comma operators. They can have some rather unexpected effects in this context. Remember--variables within full quotes are interpolated before the string is taken. So you could write the above as: print "\t\[$_

RE: how to print array element & count

2003-01-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Eri Mendez wrote: > hi all, > > another newbie here. im having problem how to print to stdout the > string[s] entered by user and appending a subscript integer after that > string. this is my modification to exercise 1 chapter 3 of Llama book: > > #!/usr/bin/perl -w > use strict; > > # filename:

RE: how to print out a variable if theres a . in it?

2002-07-09 Thread Nikola Janceski
print "Yeeehaaa: $_[0] \n"; would be more correct than $SNR_LOG, else what's the point of the subroutine? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 09, 2002 9:32 AM > To: [EMAIL PROTECTED]; [EMAIL PROTE

RE: how to print out a variable if theres a . in it?

2002-07-09 Thread TomST
change the line print "Yeeehaaa: $_ \n"; to print "Yeeehaaa: $SNR_LOG \n"; and it will work fine. -Original Message- From: Theuerkorn Johannes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 8:10 AM To: '[EMAIL PROTECTED]' Subject: how to print out a variable if theres a . in it?

RE: How to print firstly Raport page ,and after data from input file

2002-02-28 Thread Mark Anderson
I'll help what I can. You need to store the input and not print it out until after you've printed out your raport. I'm not sure what you are doing, so I haven't tried to fix anything except the printing of the report. If this code is going to be in use for a while, it would be good for you to ad

RE: how to print

2001-12-20 Thread Hanson, Robert
d also run PerlScript client side (assuming everyone has PerlScript installed), or build an ActiveX control. ...But I don't think that is what you were looking for. Rob -Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED]] Subject: Re: how to print Hi, The user'

Re: how to print

2001-12-20 Thread Jerry Preston
Hi, The user's will be using PC's running NT 4.0 when running the scripts. Thanks Again for Your HELP!! Jerry Jerry Preston wrote: > Hi, > > I am using Perl with CGI on a SUN box. I want to be able to send to the > local user running my script a report directly to their printer. What > is i

Re: How to print and go to the next line

2001-11-27 Thread John W. Krahn
Jorge Goncalvez wrote: > > Hi, I have this: > print NOUVEAU $newline2\n or die "je ne peux écrire dans $nouveau : $!\n"; > > But it prints but didn't go to the next line(\n seems to be ignored) > Why? The newline needs to be in quotes to be interpolated print NOUVEAU "$newline2\n" or die "je

Re: How to print char '\' ?

2001-07-06 Thread Aaron Craig
That's because the backslash character is also the escape character. If you want to print the string $string (where $string is NOT a variable) you write print "\$string"; # prints $string In your code below, you've escaped the closing quote, and therefore you don't tell Perl where the string e