use strict; use warnings; use IPC::System::Simple qw(systemx); # Use the systemx function to call the Python script and capture the return value my $return_value = systemx('python', 'main.py'); # Print the return value if it's not 0 (NULL in Perl context) print "Python script returned: $return_value\n" if $return_value;