Im working on a script to test using a jump server to reach remote devices.
I'm able to connect to the jump server using Net::SSH::Expect, however, I'm not sure how to then ssh to a remote device (network element).
Is there a way to create that ssh to the remote device inside the jump server's connection?
submitted by /u/jtzako
[link] [comments]
First things first, I am a data engineer but have little experience in Perl. I've been able to make some easy updates to scripts in the past but this one is a bit tougher.
I have been asked to update a Perl cgi web app that someone wrote ages ago that is used to view and manipulate text files. Currently it is hosted on server (X) and manipulates the files on that same server. However, we have to have backups/mirrors of the data on a dev server and another prod sever (Y). I.e., if I push the button to move the file to a different folder, it should do that on all three servers instead of just X. I added code to do this, referencing the additional servers with their UNC names, but I just get an error "No such file or directory" (which is not true). Googling has suggested that there may be an issue with permissions, but I can bring up the Y and DEV servers from a windows file explorer using the same path so I don't think that is necessarily the issue.
Example: Here we are trying to copy the file with a letter appended a given number of times. It works fine on the X server, its when trying to make it also work on the Y and DEV servers I get an error.
our $DIR_X = "\\\\serverX\\folder\\subfolder" ; our $DIR_Y = "\\\\serverY\\folder\\subfolder"; our $DIR_DEV = "\\\\serverDEV\\folder\\subfolder"; . . . }elsif ($query->param('action') eq 'split' && $query->param('fileNum') ne "") { my $fileNum $query->param('fileNum'); my $fileX=$DIR_X . "\\" . $fileNum . ".txt"; my $fileY $DIR_Y . "\\" . $fileNum . ".txt"; my $fileDEV = $DIR_DEV . "\\" . $fileNum . ".txt"; my $splitNbr = $query->param('splitNbr'); my @letters1("a".. "z"); for (my $i = 0; $i < $splitNbr; $i++) { my $FileNew_X = $DIR_X . "\\" $fileNum. $letters[$i]=.txt"; my $FileNew_Y = $DIR_Y . "\\" $fileNum. $letters[$i]=.txt"; my $FileNew_DEV = $DIR_DEV . "\\" $fileNum. $letters[$i]=.txt"; copy($fileX, $FileNew_X) or die "WARNING: copy failed: $!\n"; ---->>>>>ERROR AT NEXT LINE copy($fileY, $FileNew_Y) or die "WARNING: copy failed: $!\n"; copy($fileDEV, $FileNew_DEV) or die "WARNING: copy failed: $!\n"; }
Any thoughts?
submitted by /u/QueenScorp
[link] [comments]
Tagged Based Exporting
Changes for 0.07 - 2024-04-16T11:35:06-04:00
- PORTABILITY
submitted by /u/oalders [link] [comments] |
Getting Started with perlimports
add short description for open graphOlaf Alders (www.olafalders.com)
Installs noop handlers to disable Mojolicious sessions
Changes for 0.01 - 2024-04-10T12:47:08-05:00
- First public release
Mojolicious Plugin that wraps Mojolicious::Plugin::Cron for job configurability
Changes for 0.01 - 2024-04-12T09:44:22-05:00
- initial release
submitted by /u/joesuf4 [link] [comments] |
The Joy of DTrace
Apologies for the coughing, but this video is worth your time if you are a performance-tuning professional interested in what Dynamic Tracing toolchains (DTr...YouTube
Prior releases of the 6.x line relied on Lexical::Types, which was a major performance pessimisation over the 5.x releases.
6.0.4 relies on a simple source filter instead, which restores performance levels back to expected levels.
More benchmarks added to the test suite validate the dependency changes.
submitted by /u/joesuf4
[link] [comments]
Tags helpers for HTML elements.
Changes for 0.11 - 2024-04-14T18:16:11+02:00
- Fix test for 'step' parameter on Windows.
Get stock and mutual fund quotes from various exchanges
Changes for 1.59_01 - 2024-04-14T08:31:58-07:00
- YahooJSON.pm - Added code to retrieve cookies and a "crumb" required to continue to utilize the v11 API. Issue #369. The YahooJSON.pm currency module was changed to use the v8 API.
- Added initial version of CONTRIBUTING.pod that metacpan.org utilizes. It will completely replace the Hacker's Guide in the future.
- Bloomberg.pm - Changed module to extract data from JSON structure embedded within the HTML - Issue #360
- NSEIndia.pm - Eliminated need to use temp folders by storing file data from URL into a variable.
113-bit integer arithmetic
Changes for 0.04
- Allow negative values to be passed to bitwise operators (&, |, ^, ~, >>, <<). These negative values will be converted to their 113-bit 2s-complement value prior to being acted upon by the bitwise operator - thus mimicking perl's treatment of negative 32-bit/64-bit IVs.
- Add divmod() function.
- Add new test file t/bitwise_feature.t
submitted by /u/perlancar [link] [comments] |
List of new CPAN distributions – Mar 2024
dist author abstract date AI-Chat BOD Interact with AI Chat APIs 2024-03-02T22:12:10 AI-Image BOD Generate images using OpenAI's DALL-E 2024-03-06T23:01:10 Acme-CPANModules-LoadingModules PERL…perlancar's blog
SPVM Language
Changes for 0.989101 - 2023-04-14
- Imcompatible Changes
- Internal Changes
- Compilation Error Message Improvement
HTTP/2 Dynamic Benchmarks (PHP vs. ModPerl2), 2024 edition.
I ram these about four years ago, and the time differentials were about the same then as now. Monolithic POSIX-threaded server architectures like mp2 + mpm_event will always dominate in low-latency/scalability HTTP/2 benchmarks because they leverage zero-copy in the runtime.
Anyways, sexy terminal graphs with smag to enjoy!
submitted by /u/joesuf4
[link] [comments]
Lessons learned: A) Performance freaks to stop using #rstat 's runif for random generation. The Hoshiro random number generator https://arxiv.org/abs/1805.01407 is 10x faster. Implementations in #perl 's #PDL, #rstats (dqrng) and #python #numpy are within 20% of each other B) But does it make a difference in applications? To get to the bottom of this, I coded a truncated random variate generator in #rstats and #perl using #pdl (as well as standard u/perl) using the #GSL packages https://metacpan.org/pod/PDL::GSL::CDF & https://metacpan.org/pod/Math::GSL for accessing the CDF & quantile functions. In this context, it's the calculation of the #CDF that is the computationally intensive part, not the drawing of the random number itself. C) I should probably blog about these experiments at some point. Note that #pdl (but not base #perl) are rather competitive choices for large array processing with numerical operations. I mostly stay away of #python , but would not surprise me that for compute intensive stuff (where the heavy duty work is done in C/C++), it does not matter (much) which high level language one uses to build data applications submitted by /u/ReplacementSlight413 |
mstdn.science
http://mstdn.science is a place for people our field (microbiology), scientists in general, and science enthusiasts to discuss research and topics surrounding our work.Mastodon hosted on mstdn.science
Programming Feed reshared this.
Cross-platform executor for parallel tasks executed in forked processes
Changes for 0.01 - 2024-04-13
- Initial release
data pack for Business::ISBN
Changes for 20240413.001 - 2024-04-13T19:53:52Z
- data update for 2024-04-13
Acceptance testing for JSON-Schema based validators
Changes for 1.023 - 2024-04-13T19:25:31Z
- include git location in generated results files when using a custom test directory
- updated test suite: https://github.com/json-schema-org/JSON-Schema-Test-Suite/compare/bf0360f4b7c51b8f968aabe7f3f49e12b120fc85...57617f254a6734d5c64fa86fd3b08e8799970b25
Hi, im working on this perl script wherein i should get all files with filename < 900000
Ex. sample_file_802856.txt sample_file_27364692.txt sample_file_385620.txt
the script should get:
sample_file_802856.txt sample_file_385620.txt
I already have the code but it’s failing on this part coz im having a hard time getting the regex for < 900000 😆
submitted by /u/advinculareily
[link] [comments]
The great new Seven!
Changes for 0.01
- First version, released on an unsuspecting world.
A SQL Database object abstraction class
Changes for v1.3.1 - 2024-04-11T22:27:49Z
- Modified method 'structure' in DB::Object::Mysql::Table to ensure all fields returned are in lowercase.
Libraries and Utilities to work with Dogecoin
Changes for 1.20240413.0031 - 2024-04-12T17:31:00-07:00
- removed unnecessary warning
test MIDI file contents
Changes for 0.02 - 2024-04-13
- Add more MIDI event test functions. Break the midi_track interface a bit. Improve the documentation.
Tags helpers for HTML elements.
Changes for 0.10 - 2024-04-12T17:41:38+02:00
- Add 'step' parameter to Input.
Mo time utilities.
Changes for 0.01 - 2024-04-12T16:26:44+02:00
- First version.
Mo timezone utilities.
Changes for 0.03 - 2024-04-12T15:17:08+02:00
- Fix failing tests because missing DateTime::Duration.
2024 TPRC Submission Date Extended thru April 20th
Simple opinionated tool to set up a Perl distribution directory.
Changes for 0.13 - 2024-04-11
- Fix a typo in the MANIFEST.SKIP file.
- Add support to specify the keywords and no_index META directive.
Mo country utilities.
Changes for 0.01 - 2024-04-11T15:38:58+02:00
- First version.
Check for the presence of a compiler
Changes for 0.024 - 2024-04-11T14:43:48+02:00
- Make temporary dir absolute
Hi,
I am moving to RedHat 9 from RedHat 7. I am running Apache with mod_perl.
I have installed the mod_perl package on the RedHat 9 box. I am getting this error on bit of code that I wrote:
Can't locate XSLoader.pm: /usr/local/lib64/perl5/5.32/XSLoader.pm: Permission denied at /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm line 22.\nBEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm line 22.\nCompilation failed in require at /usr/lib64/perl5/vendor_perl/Apache2/Access.pm line 24.\nBEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Apache2/Access.pm line 24.
When I do a search for XSLoader.pm, I find:
/usr/lib64/perl5/vendor_perl/APR/XSLoader.pm /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm /usr/share/perl5/XSLoader.pm
I am guessing I have some path issue. Any ideas what I may need to do?
thank you
submitted by /u/OrganicStructure1739
[link] [comments]
iterators for objects that know the next element
Changes for 1.148 - 2024-04-10T18:05:54Z
- need a user release for indexing?
Audit CPAN distributions for known vulnerabilities
Changes for 20240410.001 - 2024-04-10T17:51:12Z
- data update for 2024-04-10
iterators for objects that know the next element
Changes for 1.147_01 - 2024-04-10T17:42:51Z
- Try not indexing preprocess/
iterators for objects that know the next element
Changes for 1.147 - 2024-04-10T16:55:14Z
- Release again to investigate PAUSE indexing issue (#16)
Neo4j community graph database driver for Bolt and HTTP
Changes for 0.48 - 2024-04-10
- The cypher_params config option now allows 'v2' as a synonym for v2.
- Minor documentation updates.