I'm looking for a way to do this in Perl:
$a = "60"; $b = "< 80";
if ( $a $b ) { then .... }
Here, $b "holds" an operator... can I do this? Maybe some other way?
Say I have an environment variable myvar:
myvar=\tapple\n
When the following command will print out this variable
perl -e 'print "$ENV{myvar}"'
I will literally have \tapple\n, however, I want those control chars to be evaluated and not escaped. How would I achieve it?
In the real world $ENV residing in substitution, but I hope the answer will cover that.
For example:
In Perl:
@array = (1,2,3);
system ("/tmp/a.sh @array" );
In my shell script, how do I handle this array in shell script? How do I handle the shell script to receive the arguments, and how do I use that array variable in shell script?
What is the smartest way of searching through an array of strings for a matching string in Perl?
One caveat, I would like the search to be case-insensitive
so "aAa" would be in ("aaa","bbb")
Perl 6 seems to have an explosion of equality operators. What is =:=? What's the difference between leg and cmp? Or eqv and ===?
Does anyone have a good summary?
I am trying to write a simple Perl CGI script that:
runs a CLI script
reads the resulting .out file and converts the data in the file to an HTML table.
Here is some sample data from the .out file:
10.255.202.1 2472327594 1720341
10.255.202.21 2161941840 1484352
10.255.200.0 1642646268 1163742
10.255.200.96 1489876452 1023546
10.255.200.26 1289738466 927513
10.255.202.18 1028316222 706959
10.255.200.36 955477836 703926
Any help would be much appreciated.
I'm looking for a way to convert signals connections to a simple scheme or graph.
Let's say I have 2 components with 2 line/signals around them:
component A:
input - S1
output - S2
component B:
input - S2
output - S1
This will be the input data file, and the output will be a scheme that shows it as 2 blocks with connecting lines around them or a illustration graph.
I'm wondering if an implementation of that exists in Perl's world.
If I have a Websphere MQ queue defined on another queue manager in the cluster, is there a way I can open it for writing using the perl interface? Everything I've tried brings back mqrc 2085.
Hello All
I am looking to write an extremely simple "contact us" form that will email the response to me. My two technologies are PERL and PHP. What I am wondering is, which technology is more secure? Any and all opinions will be appreciated.
Thanks for reading, and have a great day.
I am looking for the pure perl module for creation of the image file. I went through internet and found some modules GD,Imager,Prima-1.28 but these are all contains 'C' (.c) file and (.h) files.
Any help would greatly appreciated?
I would like to plot some image binary data on a grayscale matrix-like graph with custom values on axes. I'm using Perl on a Windows machine but I can't fine the right module to do this. I'm already using GD::Graph to plot other type of data but it seems unsuitable for this specific task.
Hi,
I'm wondering what is the best and useful debug tool in Linux environment for Perl/C++ scripts.
In related to that, does anyone know the differences between Eclipse to DDD tools?
Thank you,
YoDar.
I am looking for the pure Perl module for creation of the image file. I went through internet and found some modules GD, Imager, Prima-1.28 but these are all contains 'C' (.c) file and (.h) files.
Let's say I have a list of elements
@list=(1,2,3);
#desired output
1,2,3
and I want to print them as comma separated values. Most importantly, I do not want the last element to have a comma after it.
What is the cleanest way to do this in Perl?
This is my question and apparently this is the answer. I found you can stdout to null by writing NUL in command prompt so i tried writing < NUL at the end of my argument. No luck.
How do i pass in null or do something with the IO locks like that perl code does so i can get my ffmpeg script not locking up after 15 or so seconds?
What is the cleanest way of picking up a match variable form a substitution in Perl
I sometimes find myself writing
s/(something)// ;
my $x = $1 ;
then I realize that if the s/ / / fails $1 might be carrying over a value from a previous match. So I try
my $x = 'defaultvalue' ;
if ( s/(something)// )
{
$x = $1 ;
}
Is this the cleanest way of doing it?
Is it possible to pass two lists to a sub in Perl, for example:
sub Foo {
my(@list1,@list2) = @_;
}
I know I could make @_ two lists, with each sublist being the desired argument, I'm just wondering if there is a cleaner way
How do I do the following in Perl in order:
a) curl a page and save it to a variable
b) parse the value of the variable (which is HTML content) for values I want (ex: the info is kept between tags like ... )
These two functions are both infinite loops,
and the programe hangs once called in the same thread.
gtk_main();
...
pcap_loop(adhandle, 0, packet_handler, NULL);
How do I create a child thread and run pcap_loop(adhandle, 0, packet_handler, NULL); instead?
I have some code that will be logging using the Logging Application Block in Enterprise Library 5.0 from different threads. Is the LAB thread safe? Can I log like normal from different threads or will I need to synchronize the logging code so that is only used from one thread at a time?
How can I change the current selection in a wxListbook from another thread?
When I pass the listbook's pointer to the thread and try to change the selection, the app crashes. What is a safe way of doing this? Is there some message I can send to it?