Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Seekers of Perl Wisdom

( #479=superdoc: print w/ replies, xml ) Need Help??

If you have a question on how to do something in Perl, or you need a Perl solution to an actual real-life problem, or you're unsure why something you've tried just isn't working... then this section is the place to ask. Post a new question!

However, you might consider asking in the chatterbox first (if you're a registered user). The response time tends to be quicker, and if it turns out that the problem/solutions are too much for the cb to handle, the kind monks will be sure to direct you here.

User Questions
Perl seg fault while joining threads
3 direct replies — Read more / Contribute
by kamrul
on Jul 07, 2015 at 17:45
    I have a code similar to the below. I have one main script which is calling another module named initial.pm. initial.pm opens up connection with an AMQP server (In my case RabbitMQ)and using Net::AMQP::RabbitMQ library for establishing the connection. Everything works fine except when I try to join my threads I get segmentation fault. I think the Net::AMQP::RabbitMQ is not thread safe. But this is only being used by the main thread. Im pretty sure you can reproduce the error if you just copy and past the codes below. main.pl
    #!/usr/bin/perl use Cwd qw/realpath/; use File::Basename qw/dirname/; use lib 'lib'; use threads; use threads::shared; use initial; my @threads = (); my $run :shared = 1; my $init = load initial($name); $SIG{'TERM'} = sub { $run = 0; }; threads->create(\&proc1); threads->create(\&proc2); while($run){ sleep(1); print "I am main thread\n"; } $_->join() for threads->list(); sub proc1 { while($run){ sleep(1); print "I am child thread 1 \n" } } sub proc2 { while($run){ sleep(1); print "I am child thread 2 \n"; } }
    lib/initial.pm
    package initial; use Net::AMQP::RabbitMQ; use Cwd qw/realpath/; use File::Basename qw/dirname/; my $mq; my $stop = 0; sub load { my $class = shift; my $self = {}; connectq(); bless $self,$class; return $self; } sub connectq { $mq = Net::AMQP::RabbitMQ->new(); my ($host,$port,$user,$pass) = ('localhost','5672','guest','guest' +); $mq->connect($host, { user => $user, password => $pass, port => $port, timeout => 10, }); $mq->channel_open(1); $mq->consume(1, 'logger'); } 1;
    If I call the initial class after creating the threads I dont see the error. It seems the threads are copying all the previously initiated variables into it when it is being created. In my case I dont need to access my $init variable from any other threads. So is there a way to tell perl not to copy a specific variable while creating new threads ?
Looking for ideas: Converting a binary 'flags' field into something human readable
1 direct reply — Read more / Contribute
by Monk::Thomas
on Jul 07, 2015 at 17:17

    Hello fellow monks

    I wrote a parser library for a specific class of binary files (resource files for a video game). It converts the file into a human readable data structure. (hashes of hashes of array of hashes kinda thing; data fields that are only relevant for parsing the binary data streams are stripped from the result)

    One of the data types it must be able to handle are 'flags' - a variable length sequence of bytes, where the actual value is uninteresting, the interesting part is whether a certain bit (flag) is set or not, e.g if a record is deleted or compressed or has a certain property. It seems like they are mostly exactly 1, 2, 4 or 8 bytes long, so I could easily use an unsigned integer value. However there are 2 things that bug me:

    • what to do if there turns up to be a flags field which does not match integers? (e.g. 6 or 10 bytes)
    • is there a better way to represent the 'flag/bit'-nature of the value?

    My ideas:

    One could emulate a '6 Byte Flags' field by reading uint32 + uint 16 and then manually calculate the combined integer value. Did anyone say kludge/wart? Yeah. Looks like one.

    Other representations I can think of could be 1110111100001 (which could get _extremely_ long) or a hash like:

    %flags = ( 'is_deleted' => 0, # a known flag 'is_compressed' => 1, # another known flag '2^15' => 1, # a bit that is set but unknown );
    (unknown bits with value 0 are not listed in order to conserve space)

    Your ideas?

Test::Simple will install, but not be detected as an appropriate dependency in CPAN
3 direct replies — Read more / Contribute
by Weebo
on Jul 07, 2015 at 16:39

    Hello Monks,
    If this question has been asked before I apologize, I was unable to find it.

    Background:
    I recently had a data RAID have a multi-disk failure and I had to replace and rebuild, this may have nothing to do with the problem, but the timing might be relevant, but I digress. After rebuilding and loading my data onto the RAID I attempted to install chado, a Postgres database schema that uses perl libraries. In attempting to install these libraries I had repeated failures.

    Side Note:
    I'm using Ubuntu 14.04, but I was new to linux when I first started on this workstation and made a root user instead of relying on sudo and at this point everything is configured around that root user in such a way that trying to shift to sudo has actually generated more problems. I know it's not optimal, but that's how this workstation is configured.

    The problem:
    After following the failure dominoes backwards I found that Test::Simple having some kind of issue when installed. I'm running perl 5.18.2 and when I type

    install Test::Simple
    I get
    Reading '/root/.cpan/Metadata' Database was generated on Mon, 06 Jul 2015 00:41:02 GMT Running install for module 'Test::Simple' Running make for E/EX/EXODIST/Test-Simple-1.001014.tar.gz Checksum for /root/.cpan/sources/authors/id/E/EX/EXODIST/Test-Simple-1 +.001014.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Building E/EX/EXODIST/Test-Simple-1.001014.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Test::Simple Writing MYMETA.yml and MYMETA.json cp lib/Test/Builder/Module.pm blib/lib/Test/Builder/Module.pm cp lib/Test/Builder/Tester/Color.pm blib/lib/Test/Builder/Tester/Color +.pm cp lib/Test/More.pm blib/lib/Test/More.pm cp lib/Test/Builder/IO/Scalar.pm blib/lib/Test/Builder/IO/Scalar.pm cp lib/Test/use/ok.pm blib/lib/Test/use/ok.pm cp lib/Test/Tester/CaptureRunner.pm blib/lib/Test/Tester/CaptureRunner +.pm cp lib/Test/Builder.pm blib/lib/Test/Builder.pm cp lib/Test/Tester/Delegate.pm blib/lib/Test/Tester/Delegate.pm cp lib/Test/Tutorial.pod blib/lib/Test/Tutorial.pod cp lib/Test/Tester.pm blib/lib/Test/Tester.pm cp lib/Test/Tester/Capture.pm blib/lib/Test/Tester/Capture.pm cp lib/Test/Builder/Tester.pm blib/lib/Test/Builder/Tester.pm cp lib/ok.pm blib/lib/ok.pm cp lib/Test/Simple.pm blib/lib/Test/Simple.pm Manifying blib/man3/Test::Builder::Module.3 Manifying blib/man3/Test::Builder::IO::Scalar.3 Manifying blib/man3/Test::Builder.3 Manifying blib/man3/Test::Tester.3 Manifying blib/man3/Test::Tester::Capture.3 Manifying blib/man3/Test::Tester::CaptureRunner.3 Manifying blib/man3/Test::Builder::Tester.3 Manifying blib/man3/Test::use::ok.3 Manifying blib/man3/Test::Simple.3 Manifying blib/man3/Test::Tutorial.3 Manifying blib/man3/Test::More.3 Manifying blib/man3/Test::Builder::Tester::Color.3 Manifying blib/man3/ok.3 EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make -- OK 'YAML' not installed, will not store persistent state Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/00compile.t ........................... 1/24 You should load Test::T +ester before Test::Builder (or anything that loads Test::Builder) at +Test/Tester.pm line 9. t/00compile.t ........................... ok t/00test_harness_check.t ................ ok t/01-basic.t ............................ ok t/478-cmp_ok_hash.t ..................... ok t/auto.t ................................ ok t/bad_plan.t ............................ ok t/bail_out.t ............................ ok t/BEGIN_require_ok.t .................... ok t/BEGIN_use_ok.t ........................ ok t/buffer.t .............................. ok t/Builder/Builder.t ..................... ok t/Builder/carp.t ........................ ok t/Builder/create.t ...................... ok t/Builder/current_test.t ................ ok t/Builder/current_test_without_plan.t ... ok t/Builder/details.t ..................... ok t/Builder/done_testing.t ................ ok t/Builder/done_testing_double.t ......... ok t/Builder/done_testing_plan_mismatch.t .. ok t/Builder/done_testing_with_no_plan.t ... ok t/Builder/done_testing_with_number.t .... ok t/Builder/done_testing_with_plan.t ...... ok t/Builder/fork_with_new_stdout.t ........ ok t/Builder/has_plan.t .................... ok t/Builder/has_plan2.t ................... ok t/Builder/is_fh.t ....................... ok t/Builder/is_passing.t .................. ok t/Builder/maybe_regex.t ................. ok t/Builder/no_diag.t ..................... ok t/Builder/no_ending.t ................... ok t/Builder/no_header.t ................... ok t/Builder/no_plan_at_all.t .............. ok t/Builder/ok_obj.t ...................... ok t/Builder/output.t ...................... ok t/Builder/reset.t ....................... ok t/Builder/reset_outputs.t ............... ok t/Builder/try.t ......................... ok t/c_flag.t .............................. ok t/capture.t ............................. ok t/check_tests.t ......................... ok t/circular_data.t ....................... ok t/cmp_ok.t .............................. ok t/dependents.t .......................... skipped: Dependents only tes +ted when releasing t/depth.t ............................... ok t/diag.t ................................ ok t/died.t ................................ ok t/dont_overwrite_die_handler.t .......... ok t/eq_set.t .............................. ok t/exit.t ................................ ok t/explain.t ............................. ok t/extra.t ............................... ok t/extra_one.t ........................... ok t/fail-like.t ........................... ok t/fail-more.t ........................... ok t/fail.t ................................ ok t/fail_one.t ............................ ok t/filehandles.t ......................... ok t/fork.t ................................ ok t/harness_active.t ...................... ok t/import.t .............................. ok t/is_deeply_dne_bug.t ................... ok t/is_deeply_fail.t ...................... ok t/is_deeply_with_threads.t .............. skipped: no working threads t/missing.t ............................. ok t/More.t ................................ ok t/new_ok.t .............................. ok t/no_plan.t ............................. ok t/no_tests.t ............................ ok t/note.t ................................ ok t/overload.t ............................ ok t/overload_threads.t .................... ok t/plan.t ................................ ok t/plan_bad.t ............................ ok t/plan_is_noplan.t ...................... ok t/plan_no_plan.t ........................ ok t/plan_shouldnt_import.t ................ ok t/plan_skip_all.t ....................... skipped: Just testing plan & + skip_all t/require_ok.t .......................... ok t/run_test.t ............................ ok t/simple.t .............................. ok t/Simple/load.t ......................... ok t/skip.t ................................ ok t/skipall.t ............................. ok t/subtest/args.t ........................ ok t/subtest/bail_out.t .................... ok t/subtest/basic.t ....................... ok t/subtest/die.t ......................... ok t/subtest/do.t .......................... ok t/subtest/exceptions.t .................. ok t/subtest/fork.t ........................ ok t/subtest/implicit_done.t ............... ok t/subtest/line_numbers.t ................ ok t/subtest/plan.t ........................ ok t/subtest/predicate.t ................... ok t/subtest/singleton.t ................... ok t/subtest/threads.t ..................... skipped: no working threads t/subtest/todo.t ........................ ok t/subtest/wstat.t ....................... ok t/tbm_doesnt_set_exported_to.t .......... ok t/Tester/tbt_01basic.t .................. ok t/Tester/tbt_02fhrestore.t .............. ok t/Tester/tbt_03die.t .................... ok t/Tester/tbt_04line_num.t ............... ok t/Tester/tbt_05faildiag.t ............... ok t/Tester/tbt_06errormess.t .............. ok t/Tester/tbt_07args.t ................... ok t/Tester/tbt_08subtest.t ................ ok t/Tester/tbt_09do.t ..................... ok t/thread_taint.t ........................ ok t/threads.t ............................. skipped: no working threads t/todo.t ................................ ok t/undef.t ............................... ok t/use_ok.t .............................. ok t/useing.t .............................. ok t/utf8.t ................................ ok t/versions.t ............................ ok t/xt/dependents.t ....................... skipped: Dependents only tes +ted when releasing t/xxx-changes_updated.t ................. skipped: Only tested when re +leasing All tests successful. Files=118, Tests=1370, 4 wallclock secs ( 0.35 usr 0.14 sys 2.30 cus +r 1.00 csys = 3.79 CPU) Result: PASS EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make test -- OK Running make install Manifying blib/man3/Test::Builder::Module.3 Manifying blib/man3/Test::Builder::IO::Scalar.3 Manifying blib/man3/Test::Builder.3 Manifying blib/man3/Test::Tester.3 Manifying blib/man3/Test::Tester::Capture.3 Manifying blib/man3/Test::Tester::CaptureRunner.3 Manifying blib/man3/Test::Builder::Tester.3 Manifying blib/man3/Test::use::ok.3 Manifying blib/man3/Test::Simple.3 Manifying blib/man3/Test::Tutorial.3 Manifying blib/man3/Test::More.3 Manifying blib/man3/Test::Builder::Tester::Color.3 Manifying blib/man3/ok.3 Appending installation info to /root/perl5/lib/perl5/x86_64-linux/perl +local.pod EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make install -- OK

    Thinking my Test::Simple had installed I moved up the chain to the next failed package

    install CPAN::Meta::YAML
    and I get
    Running install for module 'CPAN::Meta::YAML' Running make for D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Checksum for /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YA +ML-0.016.tar.gz ok CPAN.pm: Building D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Checking if your kit is complete... Looks good Writing Makefile for CPAN::Meta::YAML Writing MYMETA.yml and MYMETA.json ---- Unsatisfied dependencies detected during ---- ---- DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz ---- Test::More [build_requires] Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module 'Test::More' Running make for E/EX/EXODIST/Test-Simple-1.001014.tar.gz Has already been unwrapped into directory /root/.cpan/build/Test-Sim +ple-1.001014-jIrl3n Has already been made Running make test Has already been tested successfully Running make install Already done Running make for D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Has already been unwrapped into directory /root/.cpan/build/CPAN-Met +a-YAML-0.016-SpaMER CPAN.pm: Building D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz cp lib/CPAN/Meta/YAML.pm blib/lib/CPAN/Meta/YAML.pm Manifying blib/man3/CPAN::Meta::YAML.3 DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-report-prereqs.t .. # # Versions for all modules listed in MYMETA.json (including optional o +nes): # # === Configure Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker 6.17 6.66 # # === Build Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker any 6.66 # # === Test Requires === # # Module Want Have # --------------------- ---- ------- # ExtUtils::MakeMaker any 6.66 # File::Basename any 2.84 # File::Find any 1.23 # File::Spec any 3.40 # File::Spec::Functions any 3.40 # File::Temp 0.19 0.23 # IO::Dir any 1.10 # JSON::PP any 2.27202 # Test::More 0.99 0.98 # lib any 0.63 # utf8 any 1.10 # vars any 1.03 # # === Test Recommends === # # Module Want Have # ---------- -------- -------- # CPAN::Meta 2.120900 2.120921 # # === Runtime Requires === # # Module Want Have # ------------ ---- ------- # B any 1.42_02 # Carp any 1.29 # Exporter any 5.68 # Fcntl any 1.11 # Scalar::Util any 1.27 # strict any 1.07 # warnings any 1.18 # # # *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +*** # # The following REQUIRED prerequisites were not satisfied: # # Test::More version '0.98' is not in required range '0.99' # t/00-report-prereqs.t .. ok t/01_api.t ............. Test::More version 0.99 required--this is onl +y version 0.98 at t/01_api.t line 7. BEGIN failed--compilation aborted at t/01_api.t line 7. t/01_api.t ............. Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/01_compile.t ......... Test::More version 0.99 required--this is onl +y version 0.98 at t/01_compile.t line 11. BEGIN failed--compilation aborted at t/01_compile.t line 11. t/01_compile.t ......... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/10_read.t ............ Test::More version 0.99 required--this is onl +y version 0.98 at t/10_read.t line 5. BEGIN failed--compilation aborted at t/10_read.t line 5. t/10_read.t ............ Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/11_read_string.t ..... Test::More version 0.99 required--this is onl +y version 0.98 at t/11_read_string.t line 4. BEGIN failed--compilation aborted at t/11_read_string.t line 4. t/11_read_string.t ..... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/12_write.t ........... Test::More version 0.99 required--this is onl +y version 0.98 at t/12_write.t line 5. BEGIN failed--compilation aborted at t/12_write.t line 5. t/12_write.t ........... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/13_write_string.t .... Test::More version 0.99 required--this is onl +y version 0.98 at t/13_write_string.t line 4. BEGIN failed--compilation aborted at t/13_write_string.t line 4. t/13_write_string.t .... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/20_subclass.t ........ Test::More version 0.99 required--this is onl +y version 0.98 at t/20_subclass.t line 5. BEGIN failed--compilation aborted at t/20_subclass.t line 5. t/20_subclass.t ........ Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/21_yamlpm_compat.t ... Test::More version 0.99 required--this is onl +y version 0.98 at t/21_yamlpm_compat.t line 4. BEGIN failed--compilation aborted at t/21_yamlpm_compat.t line 4. t/21_yamlpm_compat.t ... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/30_yaml_spec_tml.t ... Test::More version 0.99 required--this is onl +y version 0.98 at t/30_yaml_spec_tml.t line 5. BEGIN failed--compilation aborted at t/30_yaml_spec_tml.t line 5. t/30_yaml_spec_tml.t ... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/31_local_tml.t ....... Test::More version 0.99 required--this is onl +y version 0.98 at t/31_local_tml.t line 4. BEGIN failed--compilation aborted at t/31_local_tml.t line 4. t/31_local_tml.t ....... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/32_world_tml.t ....... Test::More version 0.99 required--this is onl +y version 0.98 at t/32_world_tml.t line 4. BEGIN failed--compilation aborted at t/32_world_tml.t line 4. t/32_world_tml.t ....... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/86_fail.t ............ ok Test Summary Report ------------------- t/01_api.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/01_compile.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/10_read.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/11_read_string.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/12_write.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/13_write_string.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/20_subclass.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/21_yamlpm_compat.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/30_yaml_spec_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/31_local_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/32_world_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=13, Tests=2, 0 wallclock secs ( 0.05 usr 0.00 sys 0.24 cusr 0 +.03 csys = 0.32 CPU) Result: FAIL Failed 11/13 test programs. 0/2 subtests failed. make: *** [test_dynamic] Error 255 DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz : make_test NO

    The Interpretation:
    If I am reading the output correctly, the Test::Simple that I installed and CPAN said was properly updated and configured is not actually being installed and is instead being reinstalled as a missing dependency, but is still somehow not installing the proper version for YAML to be installed. This led me to try popping open a terminal and manually installing Test::Simple from the .cpan/build directory

    # perl Makefile.PL Writing Makefile for Test::Simple Writing MYMETA.yml and MYMETA.json # make Skip blib/lib/ok.pm (unchanged) Skip blib/lib/Test/use/ok.pm (unchanged) Skip blib/lib/Test/Simple.pm (unchanged) Skip blib/lib/Test/Tester/CaptureRunner.pm (unchanged) Skip blib/lib/Test/Builder/Module.pm (unchanged) Skip blib/lib/Test/Builder.pm (unchanged) Skip blib/lib/Test/More.pm (unchanged) Skip blib/lib/Test/Builder/Tester/Color.pm (unchanged) Skip blib/lib/Test/Tester/Capture.pm (unchanged) Skip blib/lib/Test/Tutorial.pod (unchanged) Skip blib/lib/Test/Builder/IO/Scalar.pm (unchanged) Skip blib/lib/Test/Tester.pm (unchanged) Skip blib/lib/Test/Tester/Delegate.pm (unchanged) Skip blib/lib/Test/Builder/Tester.pm (unchanged) Manifying blib/man3/Test::Builder::Tester.3 Manifying blib/man3/ok.3 Manifying blib/man3/Test::More.3 Manifying blib/man3/Test::Builder::Module.3 Manifying blib/man3/Test::Builder.3 Manifying blib/man3/Test::Builder::Tester::Color.3 Manifying blib/man3/Test::use::ok.3 Manifying blib/man3/Test::Tutorial.3 Manifying blib/man3/Test::Tester.3 Manifying blib/man3/Test::Tester::CaptureRunner.3 Manifying blib/man3/Test::Simple.3 Manifying blib/man3/Test::Tester::Capture.3 Manifying blib/man3/Test::Builder::IO::Scalar.3 # make install Appending installation info to /root/perl5/lib/perl5/x86_64-linux/perl +local.pod
    Hopping back into CPAN and trying YAML again I get
    install CPAN::Meta::YAML Reading '/root/.cpan/Metadata' Database was generated on Mon, 06 Jul 2015 00:41:02 GMT Running install for module 'CPAN::Meta::YAML' Running make for D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Checksum for /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YA +ML-0.016.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Building D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Checking if your kit is complete... Looks good Writing Makefile for CPAN::Meta::YAML Writing MYMETA.yml and MYMETA.json ---- Unsatisfied dependencies detected during ---- ---- DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz ---- Test::More [build_requires] Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module 'Test::More' Running make for E/EX/EXODIST/Test-Simple-1.001014.tar.gz Checksum for /root/.cpan/sources/authors/id/E/EX/EXODIST/Test-Simple-1 +.001014.tar.gz ok CPAN.pm: Building E/EX/EXODIST/Test-Simple-1.001014.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Test::Simple Writing MYMETA.yml and MYMETA.json cp lib/Test/Builder/Tester/Color.pm blib/lib/Test/Builder/Tester/Color +.pm cp lib/Test/Builder/Module.pm blib/lib/Test/Builder/Module.pm cp lib/Test/Simple.pm blib/lib/Test/Simple.pm cp lib/Test/use/ok.pm blib/lib/Test/use/ok.pm cp lib/ok.pm blib/lib/ok.pm cp lib/Test/Tester/Capture.pm blib/lib/Test/Tester/Capture.pm cp lib/Test/Builder/Tester.pm blib/lib/Test/Builder/Tester.pm cp lib/Test/Builder/IO/Scalar.pm blib/lib/Test/Builder/IO/Scalar.pm cp lib/Test/Tester/CaptureRunner.pm blib/lib/Test/Tester/CaptureRunner +.pm cp lib/Test/Tutorial.pod blib/lib/Test/Tutorial.pod cp lib/Test/Tester/Delegate.pm blib/lib/Test/Tester/Delegate.pm cp lib/Test/Tester.pm blib/lib/Test/Tester.pm cp lib/Test/More.pm blib/lib/Test/More.pm cp lib/Test/Builder.pm blib/lib/Test/Builder.pm Manifying blib/man3/Test::use::ok.3 Manifying blib/man3/Test::Tester.3 Manifying blib/man3/Test::More.3 Manifying blib/man3/Test::Simple.3 Manifying blib/man3/ok.3 Manifying blib/man3/Test::Builder::Tester.3 Manifying blib/man3/Test::Builder::IO::Scalar.3 Manifying blib/man3/Test::Builder::Module.3 Manifying blib/man3/Test::Builder.3 Manifying blib/man3/Test::Tutorial.3 Manifying blib/man3/Test::Tester::CaptureRunner.3 Manifying blib/man3/Test::Tester::Capture.3 Manifying blib/man3/Test::Builder::Tester::Color.3 EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make -- OK 'YAML' not installed, will not store persistent state Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/00compile.t ........................... 1/24 You should load Test::T +ester before Test::Builder (or anything that loads Test::Builder) at +Test/Tester.pm line 9. t/00compile.t ........................... ok t/00test_harness_check.t ................ ok t/01-basic.t ............................ ok t/478-cmp_ok_hash.t ..................... ok t/auto.t ................................ ok t/bad_plan.t ............................ ok t/bail_out.t ............................ ok t/BEGIN_require_ok.t .................... ok t/BEGIN_use_ok.t ........................ ok t/buffer.t .............................. ok t/Builder/Builder.t ..................... ok t/Builder/carp.t ........................ ok t/Builder/create.t ...................... ok t/Builder/current_test.t ................ ok t/Builder/current_test_without_plan.t ... ok t/Builder/details.t ..................... ok t/Builder/done_testing.t ................ ok t/Builder/done_testing_double.t ......... ok t/Builder/done_testing_plan_mismatch.t .. ok t/Builder/done_testing_with_no_plan.t ... ok t/Builder/done_testing_with_number.t .... ok t/Builder/done_testing_with_plan.t ...... ok t/Builder/fork_with_new_stdout.t ........ ok t/Builder/has_plan.t .................... ok t/Builder/has_plan2.t ................... ok t/Builder/is_fh.t ....................... ok t/Builder/is_passing.t .................. ok t/Builder/maybe_regex.t ................. ok t/Builder/no_diag.t ..................... ok t/Builder/no_ending.t ................... ok t/Builder/no_header.t ................... ok t/Builder/no_plan_at_all.t .............. ok t/Builder/ok_obj.t ...................... ok t/Builder/output.t ...................... ok t/Builder/reset.t ....................... ok t/Builder/reset_outputs.t ............... ok t/Builder/try.t ......................... ok t/c_flag.t .............................. ok t/capture.t ............................. ok t/check_tests.t ......................... ok t/circular_data.t ....................... ok t/cmp_ok.t .............................. ok t/dependents.t .......................... skipped: Dependents only tes +ted when releasing t/depth.t ............................... ok t/diag.t ................................ ok t/died.t ................................ ok t/dont_overwrite_die_handler.t .......... ok t/eq_set.t .............................. ok t/exit.t ................................ ok t/explain.t ............................. ok t/extra.t ............................... ok t/extra_one.t ........................... ok t/fail-like.t ........................... ok t/fail-more.t ........................... ok t/fail.t ................................ ok t/fail_one.t ............................ ok t/filehandles.t ......................... ok t/fork.t ................................ ok t/harness_active.t ...................... ok t/import.t .............................. ok t/is_deeply_dne_bug.t ................... ok t/is_deeply_fail.t ...................... ok t/is_deeply_with_threads.t .............. skipped: no working threads t/missing.t ............................. ok t/More.t ................................ ok t/new_ok.t .............................. ok t/no_plan.t ............................. ok t/no_tests.t ............................ ok t/note.t ................................ ok t/overload.t ............................ ok t/overload_threads.t .................... ok t/plan.t ................................ ok t/plan_bad.t ............................ ok t/plan_is_noplan.t ...................... ok t/plan_no_plan.t ........................ ok t/plan_shouldnt_import.t ................ ok t/plan_skip_all.t ....................... skipped: Just testing plan & + skip_all t/require_ok.t .......................... ok t/run_test.t ............................ ok t/simple.t .............................. ok t/Simple/load.t ......................... ok t/skip.t ................................ ok t/skipall.t ............................. ok t/subtest/args.t ........................ ok t/subtest/bail_out.t .................... ok t/subtest/basic.t ....................... ok t/subtest/die.t ......................... ok t/subtest/do.t .......................... ok t/subtest/exceptions.t .................. ok t/subtest/fork.t ........................ ok t/subtest/implicit_done.t ............... ok t/subtest/line_numbers.t ................ ok t/subtest/plan.t ........................ ok t/subtest/predicate.t ................... ok t/subtest/singleton.t ................... ok t/subtest/threads.t ..................... skipped: no working threads t/subtest/todo.t ........................ ok t/subtest/wstat.t ....................... ok t/tbm_doesnt_set_exported_to.t .......... ok t/Tester/tbt_01basic.t .................. ok t/Tester/tbt_02fhrestore.t .............. ok t/Tester/tbt_03die.t .................... ok t/Tester/tbt_04line_num.t ............... ok t/Tester/tbt_05faildiag.t ............... ok t/Tester/tbt_06errormess.t .............. ok t/Tester/tbt_07args.t ................... ok t/Tester/tbt_08subtest.t ................ ok t/Tester/tbt_09do.t ..................... ok t/thread_taint.t ........................ ok t/threads.t ............................. skipped: no working threads t/todo.t ................................ ok t/undef.t ............................... ok t/use_ok.t .............................. ok t/useing.t .............................. ok t/utf8.t ................................ ok t/versions.t ............................ ok t/xt/dependents.t ....................... skipped: Dependents only tes +ted when releasing t/xxx-changes_updated.t ................. skipped: Only tested when re +leasing All tests successful. Files=118, Tests=1370, 3 wallclock secs ( 0.37 usr 0.11 sys 2.23 cus +r 1.09 csys = 3.80 CPU) Result: PASS EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make test -- OK Running make install Manifying blib/man3/Test::use::ok.3 Manifying blib/man3/Test::Tester.3 Manifying blib/man3/Test::More.3 Manifying blib/man3/Test::Simple.3 Manifying blib/man3/ok.3 Manifying blib/man3/Test::Builder::Tester.3 Manifying blib/man3/Test::Builder::IO::Scalar.3 Manifying blib/man3/Test::Builder::Module.3 Manifying blib/man3/Test::Builder.3 Manifying blib/man3/Test::Tutorial.3 Manifying blib/man3/Test::Tester::CaptureRunner.3 Manifying blib/man3/Test::Tester::Capture.3 Manifying blib/man3/Test::Builder::Tester::Color.3 Appending installation info to /root/perl5/lib/perl5/x86_64-linux/perl +local.pod EXODIST/Test-Simple-1.001014.tar.gz /usr/bin/make install -- OK Running make for D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Has already been unwrapped into directory /root/.cpan/build/CPAN-Met +a-YAML-0.016-f2lX9C CPAN.pm: Building D/DA/DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz cp lib/CPAN/Meta/YAML.pm blib/lib/CPAN/Meta/YAML.pm Manifying blib/man3/CPAN::Meta::YAML.3 DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-report-prereqs.t .. # # Versions for all modules listed in MYMETA.json (including optional o +nes): # # === Configure Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker 6.17 6.66 # # === Build Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker any 6.66 # # === Test Requires === # # Module Want Have # --------------------- ---- ------- # ExtUtils::MakeMaker any 6.66 # File::Basename any 2.84 # File::Find any 1.23 # File::Spec any 3.40 # File::Spec::Functions any 3.40 # File::Temp 0.19 0.23 # IO::Dir any 1.10 # JSON::PP any 2.27202 # Test::More 0.99 0.98 # lib any 0.63 # utf8 any 1.10 # vars any 1.03 # # === Test Recommends === # # Module Want Have # ---------- -------- -------- # CPAN::Meta 2.120900 2.120921 # # === Runtime Requires === # # Module Want Have # ------------ ---- ------- # B any 1.42_02 # Carp any 1.29 # Exporter any 5.68 # Fcntl any 1.11 # Scalar::Util any 1.27 # strict any 1.07 # warnings any 1.18 # # # *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +*** # # The following REQUIRED prerequisites were not satisfied: # # Test::More version '0.98' is not in required range '0.99' # t/00-report-prereqs.t .. ok t/01_api.t ............. Test::More version 0.99 required--this is onl +y version 0.98 at t/01_api.t line 7. BEGIN failed--compilation aborted at t/01_api.t line 7. t/01_api.t ............. Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/01_compile.t ......... Test::More version 0.99 required--this is onl +y version 0.98 at t/01_compile.t line 11. BEGIN failed--compilation aborted at t/01_compile.t line 11. t/01_compile.t ......... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/10_read.t ............ Test::More version 0.99 required--this is onl +y version 0.98 at t/10_read.t line 5. BEGIN failed--compilation aborted at t/10_read.t line 5. t/10_read.t ............ Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/11_read_string.t ..... Test::More version 0.99 required--this is onl +y version 0.98 at t/11_read_string.t line 4. BEGIN failed--compilation aborted at t/11_read_string.t line 4. t/11_read_string.t ..... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/12_write.t ........... Test::More version 0.99 required--this is onl +y version 0.98 at t/12_write.t line 5. BEGIN failed--compilation aborted at t/12_write.t line 5. t/12_write.t ........... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/13_write_string.t .... Test::More version 0.99 required--this is onl +y version 0.98 at t/13_write_string.t line 4. BEGIN failed--compilation aborted at t/13_write_string.t line 4. t/13_write_string.t .... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/20_subclass.t ........ Test::More version 0.99 required--this is onl +y version 0.98 at t/20_subclass.t line 5. BEGIN failed--compilation aborted at t/20_subclass.t line 5. t/20_subclass.t ........ Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/21_yamlpm_compat.t ... Test::More version 0.99 required--this is onl +y version 0.98 at t/21_yamlpm_compat.t line 4. BEGIN failed--compilation aborted at t/21_yamlpm_compat.t line 4. t/21_yamlpm_compat.t ... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/30_yaml_spec_tml.t ... Test::More version 0.99 required--this is onl +y version 0.98 at t/30_yaml_spec_tml.t line 5. BEGIN failed--compilation aborted at t/30_yaml_spec_tml.t line 5. t/30_yaml_spec_tml.t ... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/31_local_tml.t ....... Test::More version 0.99 required--this is onl +y version 0.98 at t/31_local_tml.t line 4. BEGIN failed--compilation aborted at t/31_local_tml.t line 4. t/31_local_tml.t ....... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/32_world_tml.t ....... Test::More version 0.99 required--this is onl +y version 0.98 at t/32_world_tml.t line 4. BEGIN failed--compilation aborted at t/32_world_tml.t line 4. t/32_world_tml.t ....... Dubious, test returned 255 (wstat 65280, 0xff +00) No subtests run t/86_fail.t ............ ok Test Summary Report ------------------- t/01_api.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/01_compile.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/10_read.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/11_read_string.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/12_write.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/13_write_string.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/20_subclass.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/21_yamlpm_compat.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/30_yaml_spec_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/31_local_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/32_world_tml.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=13, Tests=2, 0 wallclock secs ( 0.03 usr 0.02 sys 0.23 cusr 0 +.03 csys = 0.31 CPU) Result: FAIL Failed 11/13 test programs. 0/2 subtests failed. make: *** [test_dynamic] Error 255 DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: DAGOLDEN/CPAN-Meta-YAML-0.016.tar.gz : make_test NO

    The Confusion (aka TL:DR):
    Building a package said Test::Simple wasn't installed, despite two different methods saying otherwise, tried to reinstall it, said it was installed, then failed to build the package because it wasn't installed.

    The Plea:
    Help me PERLi-Monk Kenobi(s), you're my only hope(s).

standard deviation help
3 direct replies — Read more / Contribute
by vka725
on Jul 07, 2015 at 15:49
    Hi everyone!

    I'm currently working on writing a little script to be able to calculate the average energy and the standard deviation of that energy of these molecular simulations I ran. There's about 600 snapshots for each molecule and I have to find the average and standard deviation in the energy of the snap shots for each molecule.

    I am not only a super Perl newb, i'm new to coding as well. My PI helped me out for the first part (using it to find averages) and it worked. The second part was adding to it to be able to calculate the standard deviation.

    So I was able to obtain some kind of standard deviation for 3 snapshots but they did not match the standard deviation i used in excel (i used STDEV.P since we have the entire population, N, not N-1).

    I can't seem to get it right and I want to see if anyone can help me out here before I go and ask my PI. I want to understand the logic behind this as well, rather than have him just type something out for me.

    Thank you!
    #!/usr/bin/env perl $conf = $ARGV[0]; $n1 = $ARGV[1]; $n2 = $ARGV[2]; $esum0 = 0; $esum1 = 0; for($i=$n1;$i<=$n2;$i++){ $i = sprintf("%0.3d",$i); system("analyze $conf.$i E | grep \"ACE\" -A 1 > log "); open(IN,"log"); @temp = split(" ",<IN>); $e0 = $temp[2]; @temp = split(" ",<IN>); $e1 = $temp[1]; close IN; print "$i $e0 $e1 "; #---average-calculation--- $esum0 = $esum0 + $e0; $esum1 = $esum1 + $e1; } { $esum0=$esum0/$n2; $esum1=$esum1/$n2; $esum0= sprintf("%0.4f",$esum0); $esum1= sprintf("%0.4f",$esum1); } #averages my@coolbeans = ('averages', " $esum0", "$esum1"); print " @coolbeans\n"; #---standard-deviation--- for($i=$n1;$i<=$n2;$i++){ $estd0=($esum0-$e0) ** 2; $estd0=($estd0/$n2) **0.5; $estd0= sprintf ("%0.4f", $estd0); $estd1=($esum1-$e1) ** 2; $estd1=($estd1/$n2) **0.5; $estd1= sprintf ("%0.4f", $estd1); } #stdev my@arroba = ('stdev', "$estd0", "$estd1"); print " @arroba\n";
Obtaining number of counts per each name in hash
3 direct replies — Read more / Contribute
by gghelpneeded
on Jul 07, 2015 at 15:12

    Fellow Monks.

    I have a created hash key and want to count the number of each names present. I have already created the hash. The problem I am having is extracting the counts.

    Example Data

    AAA

    AAA

    ABC

    ACC

    ACB

    Below is my code.

    my %name; open(FILE, $ARGV[0]) or die "Cannot open the file: $!"; my $hashkey; my $hashvalue; while (my $line = <FILE>) { if ($line =~ /(\S+)/) { $hashkey = $1; $hashvalue = $line; $name{$hashkey} = $hashvalue; $name{$hashkey}++; } elsif ($line =~ /\S/) { chomp $line; } } foreach my $hashname (keys %name) { print "$_ $name{$_}\n" for keys %name; } close FILE; exit;

    pseudo code

    if $hashname exists

    count{}++

    Desired Output

    AAA 2

    ABC 1

    ACC 1

    ACB 1

Not a HASH reference
2 direct replies — Read more / Contribute
by Anonymous Monk
on Jul 07, 2015 at 14:02
    Hi there Monks!

    I am sending all the DATA to be processed by process() sub, since I am expecting a lot of data I want to process 100 rows at a time.
    The issue I have is that its giving me this error:

    Not a HASH reference at... this line: my $name = $row->{NAME};
    I donít understand!!!

    Thanks for looking!
    ... sub process { my $arrayref = shift; while ( my @data = splice( @{ $arrayref }, 0, 100 ) ) { foreach my $row (@data) { my $name = $row->{NAME}; my $year = $row->{YEAR}; print "$name and $address\n"; } } } __DATA__ $VAR1 = [ { 'NAME' => 'LAST PAUL', 'YEAR' => '2000', }, { 'NAME' => 'DEMARCO R', 'YEAR' => '1960', }, { 'NAME' => 'JOE M', 'YEAR' => '1981', }, { 'NAME' => 'LOU MARY', 'YEAR' => '1948', }, ];
joined records from multiple csv
2 direct replies — Read more / Contribute
by sheolikar
on Jul 07, 2015 at 12:46

    Hi monks im new to perl.I would like to extract coloumn from multiple csv and join data based on some common fields in perl.For that i am calling another subroutine by returning value but speed is very slow and not working any help code i have written for ex :

    my $file = 'tbl_Chemchar.csv'; my @items; open(my $data, '<', $file) or die "Could not open '$file' $!\n"; $i=1; while (my $line = <$data>) { my $sap_id = ''; my $catalog_num = ''; my $note_text = ''; my($catalog_num,$sap_id,$note_text) = split ',', $line; if($sap_id ne '' && $i>1) { chomp($sap_id); chomp($note_text); $packreportid = processxref($sap_id); push @items, { id => $sap_id , packreporid => $packreportid, not +e_text => $note_text}; } $i++; } sub processxref { my ($sapval_id) = shift; my $filename = 'exportchemchar.csv'; open(my $data2, '<', $filename) or die "Could not open '$filen +ame' $!\n"; while (my $line2 = <$data2>) { chomp $line2; @fields = split ",",$line2; $packrecordval = $fields[0]; $saprecord = $fields[2]; if($saprecord == $sapval_id) { return $packrecordval; exit; } # print "$cmpval \n"; } #close $data2; }
Print in box syntax
6 direct replies — Read more / Contribute
by dhendrix
on Jul 07, 2015 at 09:27
    use strict; use warnings; my $boss_first_name = "Penelope"; my $boss_last_name = "Creighton-Ward"; my $butler_first_name = "Aloysius"; my $butler_last_name = "Parker"; my $field_width = 15; print '|', ' 'x$field_width, '|', ' 'x$field_width, "|\n";
    .

    How can I change this program so it will print out a line containing the boss's first and last names in the first field and the butler's first and last names in the second field? I need the output to look like this

    | | | |Penelope |Aloysius Parker| |Creighton-Ward | |
copy only modified remote files
4 direct replies — Read more / Contribute
by perl_help26
on Jul 07, 2015 at 09:25
    Hello , I have a remote server with files i need to process every two hours. How can i only sftp the files that were overwritten after 2 hours. Should i use checksum of files or mtime? and if so how ? I need the faster way. Thanks
reading txt and update into database table
5 direct replies — Read more / Contribute
by Anonymous Monk
on Jul 07, 2015 at 07:25
    I have a .txt file where data present in below format:
    [customer] customer_id=121 # this is primary key. customer_name=abc customer_age=25 [item] item_id=222 # this is primary key. sugar=100 stock=yes
    Here 'customer' and 'item' are table names, this is external .txt file. I have to read this file and write the update statement to update the customer and update the corresponding values of table, the same applicable to to 'item' table as well and this I have to do based on primary key I have mentioned in the .txt file. what is best approach to do this.

Add your question
Title:
Your question:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":


  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2015-07-08 00:21 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (93 votes), past polls