Skip to content

Tag: perl

How to remove only the last word from a file

I created the following Perl one-liner in order to remove a word from a file This Perl also escapes special characters such as @ or $ or *, so every word that contains a special character will removed from the file. How to change the Perl syntax in order to delete only the last matched word from a file and

Uniscan: loadable library and perl binaries are mismatched

Uniscan is a tool for scanning websites which comes in kali linux and other pen tests distros. I used to use it weekly to test my applications but after some updates of my linux tools it is now giving the following error when I run it: xs/Moose.c: loadable library and perl binaries are mismatched (got handsha…

java call perl which read and write data

I have two files int the directory ‘/tmp’: test.txt ,test.pl the content of test.txt is : the content of the test.pl is: Then in java class I write : Then the content of the newtest.txt generated from the perl is : Here is the problem ,There is a difference but when I run ‘perl test.pl&#8217…

Running Perl script accidentally locked a folder

I have a Perl script which has the following code Upon running this script, I am unable to access the current folder (and open this script of course) anymore. When seeing the folder in Konqueror, there is an additional lock in the folder icon. Can anyone tell me what happened and how can I undo this? I have c…

How to replace special characters to underscore(_) perl

Using above code i am not able to handle this “Monday_øå_Tuesday_Wednesday” The output should be : Answer You can use W to negate the w character class, but the problem you’ve got is that w doesn’t match your non-ascii letters. So you need to do something like this instead: Outputs: Th…

pass commands server using perl openssh

there are 2 systems, client system, in which i am passing commands to the server by doing openssh to the server and my script goes like this and in server /p/inway/bin/inway71 is a scripts: so when i login to my server and run this script in my terminal, i will be directed to some path (i have no clue what