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; #### use strict; use warnings; use WWW::Mechanize::Chrome; my $mech = WWW::Mechanize::Chrome->new(); $mech->get('https://some-ai-service.com'); # Interact with the AI service, fill forms, extract data, etc. # $mech->submit_form( ... );