60 PerlMonks - Newest Nodes New nodes appearing on PerlMonks http://perlmonks.org/index.pl?node_id=30175 http://blogs.law.harvard.edu/tech/rss PerlMonks Newest Nodes XML Generator 20170528092109 961 Anonymous Monk PerlMonks 30 Sun May 28 09:21:09 2017 http://perlmonks.org/ 2017-05-28 19:21:09 rss,clean Sun May 28 09:21:09 2017 Re^6: Sorting files by 3 numbers in the name LanX http://perlmonks.org/index.pl?node_id=1191443 Good spot! ... hmm maybe a valid feature request to allow array-refs in sort_by, such that all fields are compared in an <a href="http://perldoc.perl.org/or.html">or</a> chain. ... note Sun, 28 May 2017 18:56:37 +0000 http://perlmonks.org/index.pl?node_id=1191443 1191443 708738 2017-05-28 14:56:37 LanX Re^3: HTML::Parser / Regex poj http://perlmonks.org/index.pl?node_id=1191442 ..tried to use HTML::Parser, but it was ended up pretty ugly, What didn't you like with using <a href="http://search.cpan.org/perldoc?HTML%3A%3AParser">HTML::Parser</a> ? #!/usr/bin/perl use warnings; use strict; use HTML::Parser... note Sun, 28 May 2017 17:15:35 +0000 http://perlmonks.org/index.pl?node_id=1191442 1191442 221725 2017-05-28 13:15:35 poj Re^3: reading files to different output files. choroba http://perlmonks.org/index.pl?node_id=1191441 Or, without any modules: my @fhs = map { open my $FH, ' ... note Sun, 28 May 2017 17:04:52 +0000 http://perlmonks.org/index.pl?node_id=1191441 1191441 832495 2017-05-28 13:04:52 choroba Re^2: Is there a "standard" way to link to other modules in POD for a CPAN module? haukex http://perlmonks.org/index.pl?node_id=1191440 I agree with this and just wanted to add a note: One of the POD to HTML converters (I forget which one) always turned a link like L into something that looked like this: "&#91;mod://... note Sun, 28 May 2017 16:58:50 +0000 http://perlmonks.org/index.pl?node_id=1191440 1191440 830549 2017-05-28 12:58:50 haukex Re^7: reading files to different output files. shmem http://perlmonks.org/index.pl?node_id=1191439 Doesn't within the while loop open the files the users enters in the command line? Yes, and there's more to it. Read about the null filehandle in &#91;doc://perl... note Sun, 28 May 2017 16:16:51 +0000 http://perlmonks.org/index.pl?node_id=1191439 1191439 510280 2017-05-28 12:16:51 shmem Re^2: .cgi?action params tultalk http://perlmonks.org/index.pl?node_id=1191438 Hi. Thanks for input. All fixed now. As I seem to do, I do not post the actual code as it is part of a far larger operation which would just lead to confusion. This was screwed up. I did n... note Sun, 28 May 2017 15:44:05 +0000 http://perlmonks.org/index.pl?node_id=1191438 1191438 1182686 2017-05-28 11:44:05 tultalk Re^5: Sorting files by 3 numbers in the name BillKSmith http://perlmonks.org/index.pl?node_id=1191437 Unfortunately, your suggestion is not much safer. It will help only if the first field is the only one that is not of fixed length. Either sort should work with <a href="?node=tobyink">tobyink</a>'s suggestio... note Sun, 28 May 2017 15:15:38 +0000 http://perlmonks.org/index.pl?node_id=1191437 1191437 957973 2017-05-28 11:15:38 BillKSmith Re^6: reading files to different output files. ic23oluk http://perlmonks.org/index.pl?node_id=1191436 the input file should come from the command line. i don't want to determine the file within the script. Doesn't within the while loop open the files the users enters in the command line? If no... note Sun, 28 May 2017 15:11:55 +0000 http://perlmonks.org/index.pl?node_id=1191436 1191436 1191414 2017-05-28 11:11:55 ic23oluk Re: reading files to different output files. shmem http://perlmonks.org/index.pl?node_id=1191435 If you use the special null filehandle for reading multiple files on the command line (i.e. if you read via ) , the name of the current input file will show up in the special variable ... note Sun, 28 May 2017 14:23:26 +0000 http://perlmonks.org/index.pl?node_id=1191435 1191435 510280 2017-05-28 10:23:26 shmem Re^5: reading files to different output files. marinersk http://perlmonks.org/index.pl?node_id=1191434 I think you'll find the mission of the Monastery isn't to fix your scripts quite as much as to help you in your personal path toward being able to fix your own scripts. Above, I fed you a s... note Sun, 28 May 2017 14:19:02 +0000 http://perlmonks.org/index.pl?node_id=1191434 1191434 210889 2017-05-28 10:19:02 marinersk Re^4: reading files to different output files. ic23oluk http://perlmonks.org/index.pl?node_id=1191433 I am in very early stages and not even familiar with the basics, maybe thats why. could someone please improve my script? would be very pleased. ... note Sun, 28 May 2017 14:08:24 +0000 http://perlmonks.org/index.pl?node_id=1191433 1191433 1191414 2017-05-28 10:08:24 ic23oluk Re^5: reading files to different output files. marinersk http://perlmonks.org/index.pl?node_id=1191432 Do I have to somehow open the input files in the script? Yes. open my $input_file, '... note Sun, 28 May 2017 14:05:56 +0000 http://perlmonks.org/index.pl?node_id=1191432 1191432 210889 2017-05-28 10:05:56 marinersk Re^3: reading files to different output files. Anonymous Monk http://perlmonks.org/index.pl?node_id=1191431 Why use if you allready have the array list?... note Sun, 28 May 2017 14:03:39 +0000 http://perlmonks.org/index.pl?node_id=1191431 1191431 961 2017-05-28 10:03:39 Anonymous Monk Re^2: reading files to different output files. ic23oluk http://perlmonks.org/index.pl?node_id=1191430 yes, but it didn't work. here's my entire script: #! /usr/bin/perl use strict; use warnings; use IO::File; my @fh; my @file_names = ("output1.txt", "output2.txt", "outp... note Sun, 28 May 2017 13:50:24 +0000 http://perlmonks.org/index.pl?node_id=1191430 1191430 1191414 2017-05-28 09:50:24 ic23oluk Re^4: reading files to different output files. ic23oluk http://perlmonks.org/index.pl?node_id=1191429 yes, but it didn't work. here's my entire script: #! /usr/bin/perl use strict; use warnings; use IO::File; my @fh; my @file_names = ("output1.txt", "output2.txt", "outp... note Sun, 28 May 2017 13:47:46 +0000 http://perlmonks.org/index.pl?node_id=1191429 1191429 1191414 2017-05-28 09:47:46 ic23oluk Re^4: reading files to different output files. ic23oluk http://perlmonks.org/index.pl?node_id=1191428 yes, I tried it this way: #! /usr/bin/perl use strict; use warnings; use IO::File; my @fh; my @file_names = ("output1.txt", "output2.txt", "output3.txt"); while ( ... note Sun, 28 May 2017 13:39:26 +0000 http://perlmonks.org/index.pl?node_id=1191428 1191428 1191414 2017-05-28 09:39:26 ic23oluk Re^3: reading files to different output files. LanX http://perlmonks.org/index.pl?node_id=1191427 What exactly is your problem now? Did you try it? And what went wrong? Cheers Rolf (addicted to the Perl Programming Language... note Sun, 28 May 2017 13:24:37 +0000 http://perlmonks.org/index.pl?node_id=1191427 1191427 708738 2017-05-28 09:24:37 LanX Re: .cgi?action params shmem http://perlmonks.org/index.pl?node_id=1191426 Please read <a href="?node_id=510718">I know what I mean. Why don&#39;t you?</a> Then read <a href="?node_id=1177642">Short, Self-Contained, Correct Example</a>. That said, if you retrieve xxx.cgi?action=one&reaction=two, the following #!... note Sun, 28 May 2017 13:22:23 +0000 http://perlmonks.org/index.pl?node_id=1191426 1191426 510280 2017-05-28 09:22:23 shmem